Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
filter.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Sep 2010 at 21:37 UTC
Updated:
29 Jul 2014 at 19:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunThis is done once for all filters by http://api.drupal.org/api/function/check_markup/7 already.
Powered by Dreditor.
Comment #2
carlos8f commentedI don't think we should keep using WordPress's function. It consistently outputs invalid XHTML because its mechanism is primitive and not mindful of the rules of nesting or even closing the p tags it has opened. In WordPress that is kept in check by using a hard-coded HTML corrector at all times. In Drupal that doesn't really work because we can't create filter dependencies. I'd like to make this a won't fix.
Comment #3
sunComment #4
kscheirerComment #5
quicksketchBetween @sun's comment in #1 and mfer's patch in #1280522: _filter_autop (line break converter) does not recognize html5 block level elements. This issue is effectively fixed.
Comment #6
quicksketchHm actually not true. Still isn't updated to include fieldset|legend, plus the addition of
dl|dd|dt.Until we remove autop, we should attempt to make it as unbroken as possible. Current attempts to convert the HTML parsing to DOM (#659580: Specify what the line break converter should do and rewrite it in DOM) have been stuck for years.
Comment #7
quicksketchReroll.
Adds missing block tags:
col
option
map
area
math
input
fieldset
legend
Intentionally does not add "style" since we have separate processing code for it already.
In the $chunk section, it adds support for dl, dd, and dt.
Comment #8
quicksketchPerhaps removing WP from the title will increase the palatability of this issue. :P
Comment #9
quicksketchIf fixed this issue will effectively solve #653988: Line break filter corrupts existing XHTML
Comment #10
sunIt would have been nice to keep the order of elements identical to WP's autop filter as in #0, so as to simplify future diffs between the libraries...
But anyway, this is good to go.
We could consider a backport, but OTOH, #1280522: _filter_autop (line break converter) does not recognize html5 block level elements wasn't backported either, and I can only guess that various other issues are missing, too. So let's rather leave it alone.
Comment #11
sun#7: filter_autop_update-900956.patch queued for re-testing.
Comment #12
quicksketchYeah agreed... but #1280522: _filter_autop (line break converter) does not recognize html5 block level elements added the new tags in arbitrary locations so I kept them in the new order to make diff'ing this particular patch easier. Thanks for RTBC'ing this.
Comment #13
dries commentedCommitted to 8.x. Thanks.