Patch #22898
closed!>image.png! generates invalid HTML
90%
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
Updated by Jan from Planio www.plan.io over 8 years ago
- Blocks Feature #22923: Export Wiki to ODT added
Updated by Jan from Planio www.plan.io over 8 years ago
- Target version set to Candidate for next minor release
- % Done changed from 0 to 90
Updated by Go MAEDA over 8 years ago
- File firebug-output.png firebug-output.png added
- Target version changed from Candidate for next minor release to 3.3.0
Confirmed the problem. Firebug reports the DOM like the following. We can see "<p> </p>".
Setting target version to 3.3.0.
Updated by Jean-Philippe Lang over 8 years ago
- Target version changed from 3.3.0 to 3.2.3
Updated by Jean-Philippe Lang over 8 years ago
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang