[wp-trac] [WordPress Trac] #33738: Quotes and other texturize characters are displayed differently in the customizer vs the front end of site

WordPress Trac noreply at wordpress.org
Sat Sep 5 05:26:36 UTC 2015


#33738: Quotes and other texturize characters are displayed differently in the
customizer vs the front end of site
--------------------------+----------------------
 Reporter:  seawaves      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Customize     |     Version:  4.3
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by westonruter):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 @seawaves: Thanks for the report, and you are totally right. This is
 actually a known issue and is to be expected given how changes to the
 title get previewed in the Core themes. The site title (`blogname`) has a
 `postMessage` transport for pushing the setting changes into the preview.
 This is opposed to the default `refresh` transport. When the `refresh`
 transport is used, whenever you change a setting the preview will do a
 full reload and PHP will re-generate the page with the new setting
 applied: this means that the PHP filters added to the site title can be
 applied, such as texturize. The `refresh` transport is slow however.

 The `postMessage` transport is instant since it uses JavaScript to preview
 the change. The problem with the JavaScript preview mechanism, however, is
 that the logic being done in PHP has to be completely replicated and
 emulated on the client. As such, the `postMessage` transport violates the
 DRY principle since logic has to be written twice. What's more is that it
 is not possible to fully replicate all of the logic that exists in PHP
 since any number of plugins may add other PHP filters to how the title
 renders, such as making the text all uppercase.

 We are actually investigating a middle-ground between `postMessage`
 transport and the `refresh` transport in this 4.4 release cycle: it's a
 sort of hybrid transport called `partialRefresh`. This is the mechanism
 that is used actually to preview changes to a menus in the Customizer in
 4.3.

 If a setting, such as the `blogname`, needs to fully make use of all the
 PHP filters applying to it without replicating all of the PHP logic in JS
 (which is not possible anyway), then in 4.4 it may be possible to use
 `partialRefresh` transport to update the `blogname` instead. It won't be
 instant preview, since an Ajax request is still required, but it will be
 faster than a full refresh and it will be sure to include all of the PHP
 logic applied by plugins.

 I'll close this, but please do follow development on #27355 for updates on
 `partialRefresh`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33738#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list