Coding Standards: Escape id attributes in WP_Customize_Control::render_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
This commit is contained in:
Sergey Biryukov
2021-10-22 16:08:10 +00:00
parent 1cf97a3c14
commit 7fb3aa1597
@@ -632,8 +632,8 @@ class WP_Customize_Control {
?>
</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; ?>
@@ -675,7 +675,7 @@ class WP_Customize_Control {
*/
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