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 #2

Updated by Anonymous almost 8 years ago

  • File t_icon_fighter_skill5.png added
Actions #3

Updated by Go MAEDA almost 8 years ago

  • File deleted (t_icon_fighter_skill5.png)
Actions #4

Updated by Jan from Planio www.plan.io almost 8 years ago

Actions #5

Updated by Jan from Planio www.plan.io almost 8 years ago

  • Target version set to Candidate for next minor release
  • % Done changed from 0 to 90
Actions #6

Updated by Go MAEDA almost 8 years ago

Confirmed the problem. Firebug reports the DOM like the following. We can see "<p> </p>".

Setting target version to 3.3.0.

Actions #7

Updated by Jean-Philippe Lang almost 8 years ago

  • Target version changed from 3.3.0 to 3.2.3
Actions #8

Updated by Jean-Philippe Lang almost 8 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
Actions

Also available in: Atom PDF