Opened 10 years ago

Closed 10 years ago

#10037 closed defect (fixed)

IE generates majorly malformed output when input is malformed HTML

Reported by: Jared Jurkiewicz Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.4
Component: Editor Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

IE generates majorly malformed output when input is malformed HTML

While yes, mlformed input is going to mean malformed output, in this case IS is especially bad and can cause some significant problems in both performance and output of the browser.

Example (screwed up closure):
<p> some text </span>

What IE actually generates is a DOM node with taqgname: /span Egad. So when we process output, we output stuff like:

</span><span>

And then if we set the value back into the editor, it gets *worse*, the next pass ends up: </span><span></span><span>

And so on. It basically goes into a cascade of malformed HTML because of the invalid DOM node.

This is thankfully also easy to catch and avoid. In html.js, we just need to check the tag name in the IE block, and if the tag name starts with '/', we know this is a bogus tag due to funky input, and can just skip it. By doing so, the cascade of malformed HTML is avoided.

!

Change History (1)

comment:1 Changed 10 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [20434]) Fixing malformed HTML output issues. fixes #10037

Note: See TracTickets for help on using tickets.