Closed
Labels
[Feature] Writing FlowBlock selection, navigation, splitting, merging, deletion...[Type] BugAn existing feature does not function as intended
Milestone
Description
Issue Overview
An amazing feature of the WordPress editing experience is you can enter "dumb" quotes, aka straight quotes or primes — and when the post is filtered for view with wp_texturize they automagically turn into curly quotes for proper typography.
Steps to Reproduce (for bugs)
- Make a new post with Gutenberg, I tested with v 1.6.1 and WP trunk (latest Safari on macOS)
- Publish and view the resulting post in the front-end
Expected Behavior
I expected ' to turn into ’ and " to turn into ”.
Current Behavior
Instead, the quotes stayed the same (straight primes).
Possible Solution
I'm not sure, but it could have to do with Gutenberg post content not being filtered properly through the built-in WP texturize functions.
Screenshots
After publishing on the front-end

Related Issues and/or PRs
Noticed this when debugging punctuation weirdness on https://ma.tt/2017/11/new-backpack-aer-fit-pack/
Metadata
Metadata
Assignees
Labels
[Feature] Writing FlowBlock selection, navigation, splitting, merging, deletion...[Type] BugAn existing feature does not function as intended

Activity
lancewillett commentedon Nov 6, 2017
Looking at the raw post HTML it looks like Gutenberg converts simple quotes into entities:
So it's possible texturize is ignoring
'since it already looks converted?aduth commentedon Dec 13, 2017
This appears to be another issue of React's default string sanitization for block serialization working against us, since the WordPress texturize step is not expecting these to be represented as entities.
A couple ideas:
wptexturizereplaces to include these valuessaveserialization which skips the sanitizationRelated issues with serialization:
save#421lancewillett commentedon Apr 9, 2018
Re-testing after fixes with fd08045
Looks good! Texturize in the front-end output works as expected. Chrome latest on macOS, Gutenberg 2.6.0 and WP 4.9.5.
Editor:

Front-end output:
