Coding Standards: Add missing escaping functions to WP_Customize_Control and WP_Customize_Nav_Menu_Location_Control.

Follow-up to [20295], [32806].

Props nareshbheda, shailu25, sabernhardt, audrasjb.
Fixes #60324.





git-svn-id: https://develop.svn.wordpress.org/trunk@57369 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras 2024-01-28 07:48:15 +00:00
parent 0c4cc89447
commit a9e47699a7
2 changed files with 2 additions and 2 deletions

View File

@ -553,7 +553,7 @@ class WP_Customize_Control {
<select id="<?php echo esc_attr( $input_id ); ?>" <?php echo $describedby_attr; ?> <?php $this->link(); ?>>
<?php
foreach ( $this->choices as $value => $label ) {
echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';
echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . esc_html( $label ) . '</option>';
}
?>
</select>

View File

@ -77,7 +77,7 @@ class WP_Customize_Nav_Menu_Location_Control extends WP_Customize_Control {
<select <?php $this->link(); ?>>
<?php
foreach ( $this->choices as $value => $label ) :
echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';
echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . esc_html( $label ) . '</option>';
endforeach;
?>
</select>