Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #25856, comment 18


Ignore:
Timestamp:
12/23/2013 10:32:16 PM (11 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25856, comment 18

    v2 v3  
    1111- 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.
    1212
    13 There are no "self-closing" tags in HTML 5.0. Instead some tags don't have a closing tag and some closing tags can be [http://www.w3.org/TR/html5/syntax.html#syntax-tag-omission omitted]. Among them is `<p>`. Been thinking whether it is practical to stop outputting `</p>`s from wpautop(). This has been supported in all browsers since the early days (mid 90's) and works really well. It was "invalid" in the XHTML 1.0 days but that time is long gone.
     13There are no "self-closing" tags in HTML 5.0. Instead some tags don't have a closing tag and some closing tags can be [http://www.w3.org/TR/html5/syntax.html#syntax-tag-omission omitted]. Among them is `<p>`. Been thinking whether it is practical to stop outputting `</p>`s from wpautop(). This has been supported in all browsers since the early days (mid 90's) and works really well. It was "invalid" in the XHTML 1.0 era but that time is long gone.
    1414
    1515Another thing I've been thinking about is to return early from wpautop() when there are no line breaks in the source. This will not only make it faster for one-paragraph posts, but would allow for storing "full-html" content that would bypass autop automatically.