Customize: Prevent breaking the customizer when site title contains templating syntax.

When the site title is inside an underscore template, syntax defined in `wp.template` like `{{ }}` is treated as special characters and will make Underscore treat it as data to be compiled/rendered.

Props pierlo, donmhico.
Fixes #46863.

git-svn-id: https://develop.svn.wordpress.org/trunk@46389 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling 2019-10-04 21:58:48 +00:00
parent 25ba9074cc
commit 84dc68a77f
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
<div class="favicon">
<img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
</div>
<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
<span class="browser-title" aria-hidden="true"><# print( '<?php bloginfo( 'name' ); ?>' ) #></span>
</div>
<img class="app-icon-preview" src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
</div>

View File

@ -1431,7 +1431,7 @@ function wp_print_media_templates() {
<div class="favicon">
<img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
</div>
<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
<span class="browser-title" aria-hidden="true"><# print( '<?php bloginfo( 'name' ); ?>' ) #></span>
</div>
<strong aria-hidden="true"><?php _e( 'As an app icon' ); ?></strong>