WordPress.org

Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #19855, comment 9


Ignore:
Timestamp:
03/04/12 00:15:57 (3 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19855, comment 9

    v2 v3  
    1414}}} 
    1515 
     16Then it won't be affected by the other regex. 
     17 
     18Yes, 19855-2.patch still runs the content of <pre> tags through the rest of wpautop() similar to how it works now. The (eventual) problem with 19855.patch is that it still uses the non-greedy match-all `(.*?)` that causes the problem in this ticket. Thinking if we are going to modernize/refactor the exclusion of <pre> tags from wpautop, we could avoid that. 
     19 
     20Tried the approach from wptexturize() with `preg_split('|(</?pre( [^>]*)?>)|', $pee, -1, PREG_SPLIT_DELIM_CAPTURE);`. This seems to work well but the code is more complex. Can add a patch later.