[wp-trac] Re: [WordPress Trac] #7056: wptexturize should leave contents of pre tags verbatim

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 21 07:14:08 GMT 2009


#7056: wptexturize should leave contents of pre tags verbatim
-----------------------------------+----------------------------------------
 Reporter:  nbachiyski             |        Owner:  anonymous
     Type:  defect (bug)           |       Status:  reopened 
 Priority:  normal                 |    Milestone:  2.8      
Component:  General                |      Version:  2.8      
 Severity:  normal                 |   Resolution:           
 Keywords:  has-patch wptexturize  |  
-----------------------------------+----------------------------------------

Comment(by nbachiyski):

 Regex parsing of tags sucks. Setting {{{$next}}} to {{{false}}} doesn't
 work if you have any tags inside a pre/code/whatever. The current patch
 doesn't work with two nested {{{pre}}}s. So, here are the stacks.

 The stacks approach works for any number/kind of nested elements. It also
 keeps a dynamic list of the not texturizable tags and shortcodes, so that
 a plugin can modify them. This way you can opt-out your shortcode from
 {{{wptexturize()}}} (this fixes #6969).

 Please, have a look at [http://svn.automattic.com/wordpress-tests/wp-
 testcase/test_includes_formatting.php the unit tests], I would be happy if
 anybody adds more. They are really useful in this case.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/7056#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list