WordPress.org

Make WordPress Core

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


Ignore:
Timestamp:
12/24/2013 01:31:35 AM (8 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25856, comment 18

    v3 v4  
    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 era but that time is long gone.
     13There are no "self-closing" tags in HTML 5.0. Instead some tags [http://www.w3.org/TR/html5/syntax.html#void-elements 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.