Skip to content
Permalink
Browse files

Customize: Prevent breaking the customizer when site title contains t…

…emplating 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
  • Loading branch information...
ocean90 committed Oct 4, 2019
1 parent 25ba907 commit 84dc68a77f1811b1056ba8aada7ab862c1ac0b2b
@@ -64,7 +64,7 @@ public function content_template() {
<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>
@@ -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>

0 comments on commit 84dc68a

Please sign in to comment.
You can’t perform that action at this time.