Make WordPress Core

Opened 10 years ago

Last modified 5 years ago

#30531 assigned enhancement

Make wptexturize the last filter before output

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: Priority: normal
Severity: normal Version:
Component: Formatting Keywords:
Focuses: Cc:


This will allow it to be simplified/refactored and run faster.


  • Not looking at shortcodes as it will run after do_shortcode(). That will make it less complex and faster. This also avoids all edge cases with shortcodes.
  • Better detection/handling of quotes around <p> tags as it will run after wpautop(). Also, preg_split() will split the text in more chunks which will be easier to process.

Disadvantage: the no_texturize_shortcodes filter will stop working.

Change History (6)

#1 @azaozz
10 years ago

We've discussed this with @miqrogroove some time ago and it seems the best way forward.

A simple workaround for the no_texturize_shortcodes filter would be to insert markers around these shortcodes, and remove them after wptexturize() (as discussed in

Alternatively that filter can be deprecated, depending on how many plugins are using it. Certain HTML tags are excluded from texturizing, and more can be added by plugins. For example the [code] shortcode would be replaced by <pre> or <code> tag, both of which are excluded.

#2 @obenland
9 years ago

  • Owner set to azaozz
  • Status changed from new to assigned

#3 @obenland
9 years ago

  • Keywords 4.2-early removed
  • Milestone changed from Future Release to 4.3

#4 @obenland
9 years ago

  • Milestone changed from 4.3 to Future Release

#5 @miqrogroove
9 years ago

#29810 was marked as a duplicate.

#6 @miqrogroove
9 years ago

This goes hand-in-hand with #6984 and I've tried to close all other related tickets as duplicates.

Note: See TracTickets for help on using tickets.