Line breaking filter does not treat hr as a block level element and encloses it in paragraph tags (if used with empty lines above and below). This is invalid in XHTML.
Attached patch adds the hr tag to a list of block elements in _filter_autop. Possibly some more tags should be added (fieldset?, center for html?), but the list doesn't correspond to any DTD, so it's hard to tell.
$block = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|p|h[1-6]|hr)';
Patch is created against the head, but tested only on the 5.6 branch (code is the same).
Comments
Comment #1
alexanderpas commentedConfirming this bug, also in 6.0-rc2
code seems correct.
HR should be considered a block level element.
Comment #2
gábor hojtsyCommitted, thanks.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
damien tournoud commentedApparently this is an issue on 5.x too.
Comment #5
alexanderpas commentedported to D5 ;)
Comment #6
damien tournoud commentedStraightforward port, thanks @alexanderpas.
Comment #7
drummCommitted to 5.x.