Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #25856, comment 18


Ignore:
Timestamp:
12/23/2013 10:07:05 PM (9 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25856, comment 18

    initial v1  
    88- The part `preg_replace('!(<' . $allblocks . '[^>]*\/>)!i', "$1\n\n"...` is not needed. As far as I know there aren't any block elements in HTML 5.0 that don't require a closing tag.
    99- Not sure which tags `preg_match( '/<p[^>]*>.*?<\/p[^>]*>/si'...` is supposed to match. Currently it matches `<p>|<pre>|<param>|<progress>`. Doesn't look like this was intended. If we need only `<p>`, the start of the regex would be `/<p(?: [^>]+)?>...`, not sure why the closing tag is expanded.
     10- On the same line: the `preg_match( '/<' . $allblocks .'[^>]*\/>/si'...` doesn't make sense. See the first point.
    1011- Don't see a point in preserving formatting/line breaks in `<audio>`, `<video>` and `<object>`. The only HTML tag where this matters is `<pre>`. All line breaks in the other tags should probably be stripped, saving some processing time. Further, this will fail for `<object>` as it can be nested and often is.
    1112