Title: reverting wptexturize changes
Last modified: August 31, 2022

---

# reverting wptexturize changes

 *  [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/reverting-wptexturize-changes/)
 * Hello,
 * I’m maintaining a wordpress.org plugin that creates a custom shortcode.
    As part
   of the shorcode, I disable the texturization of the shortcode input using `add_filter('
   no_texturize_shortcodes', 'embedchessboard_no_texturize' );` My plugin breaks
   when the string `"this"` is automatically changed to `“this”`, with fancy quotes.
 * Unfortunately, a bug was recently introduced that under some circumstances makes
   the no_texturize_shortcodes filter fails; this happens with block based themes.
   
   The bug is tracked here [https://github.com/WordPress/gutenberg/issues/37754](https://github.com/WordPress/gutenberg/issues/37754)
   but after several months there’s no sign of a solution.
 * I tried to implement a workaround in my plugin to revert the texturize changes,
   particularly replacing the funny quotes like `“this”` back into `"this"`.
    This
   however turned out to be more challenging than expected, simple replacements 
   failing to work: `$pgnText = str_replace(array("“", "”"), "\"", $pgnText);`
 * Any suggestions how to reliably undo the texturize changes to the quote chars?
 * Thanks in advance.
    -  This topic was modified 3 years, 9 months ago by [pgn4web](https://wordpress.org/support/users/pgn4web/).
    -  This topic was modified 3 years, 9 months ago by [pgn4web](https://wordpress.org/support/users/pgn4web/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/reverting-wptexturize-changes/#post-15969856)
 * Did a bit more of research and it might be that there’s no possible workaround
   to be implemented in the plugin. It seems that the shortcode content is passed
   to the plugin before applying the texturize, so nothing for the plugin to revert.
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/reverting-wptexturize-changes/#post-15970572)
 * You can completely disable the “texturize” anti-feature:
 * `add_filter('run_wptexturize', '__return_false'};`
 * I use something similar on all WP sites I manage.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘reverting wptexturize changes’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [Dion](https://wordpress.org/support/users/diondesigns/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/reverting-wptexturize-changes/#post-15970572)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
