Skip to content

Commit d848a30

Browse files
Escape caption labels
1 parent 3370526 commit d848a30

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/wp-admin/includes/media.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3277,11 +3277,11 @@ function edit_form_image_editor( $post ) {
32773277
<label for="attachment_caption"><strong>
32783278
<?php
32793279
if ( str_starts_with( $post->post_mime_type, 'video' ) ) {
3280-
_e( 'Video Description' );
3280+
esc_html_e( 'Video Description' );
32813281
} elseif ( str_starts_with( $post->post_mime_type, 'image' ) ) {
3282-
_e( 'Image Caption' );
3282+
esc_html_e( 'Image Caption' );
32833283
} else {
3284-
_e( 'Caption' );
3284+
esc_html_e( 'Caption' );
32853285
}
32863286
?>
32873287
</strong></label><br />

src/wp-includes/media-template.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,11 @@ function wp_print_media_templates() {
539539
<# } #>
540540
<span class="setting" data-setting="caption">
541541
<# if ( 'video' === data.type ) { #>
542-
<label for="attachment-details-two-column-caption" class="name"><?php _e( 'Video Description' ); ?></label>
542+
<label for="attachment-details-two-column-caption" class="name"><?php esc_html_e( 'Video Description' ); ?></label>
543543
<# } else if ( 'image' === data.type ) { #>
544-
<label for="attachment-details-two-column-caption" class="name"><?php _e( 'Image Caption' ); ?></label>
544+
<label for="attachment-details-two-column-caption" class="name"><?php esc_html_e( 'Image Caption' ); ?></label>
545545
<# } else { #>
546-
<label for="attachment-details-two-column-caption" class="name"><?php _e( 'Caption' ); ?></label>
546+
<label for="attachment-details-two-column-caption" class="name"><?php esc_html_e( 'Caption' ); ?></label>
547547
<# } #>
548548
<textarea id="attachment-details-two-column-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea>
549549
</span>
@@ -797,11 +797,11 @@ function wp_print_media_templates() {
797797
<# } #>
798798
<span class="setting" data-setting="caption">
799799
<# if ( 'video' === data.type ) { #>
800-
<label for="attachment-details-caption" class="name"><?php _e( 'Video Description' ); ?></label>
800+
<label for="attachment-details-caption" class="name"><?php esc_html_e( 'Video Description' ); ?></label>
801801
<# } else if ( 'image' === data.type ) { #>
802-
<label for="attachment-details-caption" class="name"><?php _e( 'Image Caption' ); ?></label>
802+
<label for="attachment-details-caption" class="name"><?php esc_html_e( 'Image Caption' ); ?></label>
803803
<# } else { #>
804-
<label for="attachment-details-caption" class="name"><?php _e( 'Caption' ); ?></label>
804+
<label for="attachment-details-caption" class="name"><?php esc_html_e( 'Caption' ); ?></label>
805805
<# } #>
806806
<textarea id="attachment-details-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea>
807807
</span>

0 commit comments

Comments
 (0)