WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #19855, comment 14


Ignore:
Timestamp:
03/18/12 21:20:25 (2 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19855, comment 14

    initial v1  
    1 The 19855-4.patch combines "the best" of 19855.patch and 19855-2.patch. As the <pre> tags cannot be nested, there's no need to use regex at all. Splitting on the closing tag and then on the opening tag in each substring only needs strpos() and substr(). Also uses a dummy `<pre...></pre>` as replacement string so the rest of wpautop() can handle it correctly. 
     1The 19855-4.patch combines "the best" of the previous three patches. As the <pre> tags cannot be nested, there's no need to use regex at all. Splitting on the closing tag and then on the opening tag in each substring only needs strpos() and substr(). Also uses a dummy `<pre...></pre>` as replacement string so the rest of wpautop() can handle it correctly. 
    22 
    33The only thing left seems to be to try and find some old post_content that includes <pre> and was created with WP 2.0 - 2.3. Think then there were some inconsistencies inside the <pre> tags.