From: Tarjei H. <ta...@sc...> - 2011-02-14 09:30:32
|
Hi, I cooked up the following patch that seems to fix bug 3107209: --- src/org/cyberneko/html/HTMLTagBalancer.java (revision 288) +++ src/org/cyberneko/html/HTMLTagBalancer.java (working copy) @@ -1001,7 +1001,10 @@ if (depth == -1) { if (elem.code == HTMLElements.P) { forceStartElement(element, emptyAttributes(), synthesizedAugs()); - endElement(element, augs); + boolean startElementWasCreated =forceStartElement(element, emptyAttributes(), synthesizedAugs()); + if (startElementWasCreated) { + endElement(element, augs); + } } else if (!elem.isEmpty()) { notifyDiscardedEndElement(element, augs); Please review and if possible, attach it. Attached to this email are two patches: 1. HTMLTagBalancer.java.patch: same as the item above. 2. Bug3107209.test.patch: A webpage demonstrating the bug and a test that shows that the patch above fixes the problem. Any idea when a fix may be released? -- Regards / Med vennlig hilsen Tarjei Huse Mobil: 920 63 413 |