Project

General

Profile

Actions

Patch #22898

closed

!>image.png! generates invalid HTML

Added by Gregor Schmidt almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Text formatting
Target version:
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

Blocks Redmine - Feature #22923: Export Wiki to ODTNew

Actions
Actions

Also available in: Atom PDF