Actions
Patch #22898
closed!>image.png! generates invalid HTML
Start date:
Due date:
% Done:
90%
Estimated time:
Description
Redmine's RedCloth (current trunk r15425) generates the following HTML:
Input: !>test.png! Paragraph with floating image
Output: <p><div style="float:right"><img src="test.png" alt="" /></div> Paragraph with floating image</p>
The div
within the p
is not allowed, therefore HTML parsers will autoclose the p
, the div
becomes a sibling to it, the text content will become another sibling and the closing p
will trigger another empty p
element.
This is what's generated in Firefox's DOM: <p></p><div style="float:right"><img src="test.png" alt=""/> Paragraph with floating image<p></p>
.
The attached patch simply adds a span
instead of a div
and therefore generates the expected DOM structure.
Files
Related issues
Actions