Skip to content

Commit

Permalink
Coding Standards: Escape id attributes in `WP_Customize_Control::re…
Browse files Browse the repository at this point in the history
…nder_content()` and `::print_template()`.

Follow-up to [30014], [38906].

Props sabbirshouvo.
See #54295.

git-svn-id: https://develop.svn.wordpress.org/trunk@51927 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Oct 22, 2021
1 parent 1cf97a3 commit 7fb3aa1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wp-includes/class-wp-customize-control.php
Expand Up @@ -632,8 +632,8 @@ protected function render_content() {
?>
</button>
<div class="new-content-item">
<label for="create-input-<?php echo $this->id; ?>"><span class="screen-reader-text"><?php _e( 'New page title' ); ?></span></label>
<input type="text" id="create-input-<?php echo $this->id; ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title&hellip;' ); ?>">
<label for="create-input-<?php echo esc_attr( $this->id ); ?>"><span class="screen-reader-text"><?php _e( 'New page title' ); ?></span></label>
<input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title&hellip;' ); ?>">
<button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
</div>
<?php endif; ?>
Expand Down Expand Up @@ -675,7 +675,7 @@ protected function render_content() {
*/
final public function print_template() {
?>
<script type="text/html" id="tmpl-customize-control-<?php echo $this->type; ?>-content">
<script type="text/html" id="tmpl-customize-control-<?php echo esc_attr( $this->type ); ?>-content">
<?php $this->content_template(); ?>
</script>
<?php
Expand Down

0 comments on commit 7fb3aa1

Please sign in to comment.