Make WordPress Core

Changeset 46389


Ignore:
Timestamp:
10/04/2019 09:58:48 PM (5 years ago)
Author:
ocean90
Message:

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-site-icon-control.php

    r44796 r46389  
    6565                                <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
    6666                            </div>
    67                             <span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
     67                            <span class="browser-title" aria-hidden="true"><# print( '<?php bloginfo( 'name' ); ?>' ) #></span>
    6868                        </div>
    6969                        <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' ); ?>"/>
  • trunk/src/wp-includes/media-template.php

    r46375 r46389  
    14321432                <img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
    14331433            </div>
    1434             <span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
     1434            <span class="browser-title" aria-hidden="true"><# print( '<?php bloginfo( 'name' ); ?>' ) #></span>
    14351435        </div>
    14361436
Note: See TracChangeset for help on using the changeset viewer.