| @@ -273,9 +273,9 @@ | ||
| 273 | 273 | return null; |
| 274 | 274 | } |
| 275 | 275 | return array( |
| 276 | 276 | 'id' => $user_id, |
| 277 | - 'name' => (string) $user->display_name, | |
| 277 | + 'name' => openstation_plain_text_title( $user->display_name ), | |
| 278 | 278 | 'slug' => (string) $user->user_nicename, |
| 279 | 279 | 'avatar' => (string) get_avatar_url( $user_id, array( 'size' => 64 ) ), |
| 280 | 280 | 'edit_url' => (string) get_edit_user_link( $user_id ), |
| 281 | 281 | ); |
| @@ -353,12 +353,12 @@ | ||
| 353 | 353 | $out = array(); |
| 354 | 354 | foreach ( $comments as $comment ) { |
| 355 | 355 | $out[] = array( |
| 356 | 356 | 'id' => (int) $comment->comment_ID, |
| 357 | - 'author' => (string) $comment->comment_author, | |
| 357 | + 'author' => openstation_plain_text_title( $comment->comment_author ), | |
| 358 | 358 | 'user_id' => (int) $comment->user_id, |
| 359 | 359 | 'date' => mysql2date( 'c', $comment->comment_date_gmt, false ), |
| 360 | - 'excerpt' => wp_html_excerpt( wp_strip_all_tags( (string) $comment->comment_content ), 140, '...' ), | |
| 360 | + 'excerpt' => openstation_plain_text_title( wp_html_excerpt( openstation_strip_all_tags( (string) $comment->comment_content ), 140, '...' ) ), | |
| 361 | 361 | 'edit_url' => (string) admin_url( 'comment.php?action=editcomment&c=' . (int) $comment->comment_ID ), |
| 362 | 362 | ); |
| 363 | 363 | } |
| 364 | 364 | return $out; |
| @@ -384,9 +384,9 @@ | ||
| 384 | 384 | } |
| 385 | 385 | foreach ( $terms as $term ) { |
| 386 | 386 | $out[] = array( |
| 387 | 387 | 'id' => (int) $term->term_id, |
| 388 | - 'name' => (string) $term->name, | |
| 388 | + 'name' => openstation_plain_text_title( $term->name ), | |
| 389 | 389 | 'slug' => (string) $term->slug, |
| 390 | 390 | 'taxonomy' => (string) $term->taxonomy, |
| 391 | 391 | 'tax_label' => (string) $tax->labels->singular_name, |
| 392 | 392 | 'count' => (int) $term->count, |
| @@ -409,9 +409,9 @@ | ||
| 409 | 409 | $out = array(); |
| 410 | 410 | foreach ( $attachments as $att ) { |
| 411 | 411 | $out[] = array( |
| 412 | 412 | 'id' => (int) $att->ID, |
| 413 | - 'title' => (string) get_the_title( $att ), | |
| 413 | + 'title' => openstation_plain_text_title( get_the_title( $att ) ), | |
| 414 | 414 | 'mime' => (string) $att->post_mime_type, |
| 415 | 415 | 'thumb' => (string) wp_get_attachment_image_url( $att->ID, 'thumbnail' ), |
| 416 | 416 | 'edit_url' => (string) get_edit_post_link( $att->ID, 'raw' ), |
| 417 | 417 | ); |