Open GoogleCodeExporter opened 8 years ago
[deleted comment]
Tried 1.5.2, 1.5.1, and 1.5, so this was introduced in 1.5.
Original comment by virtuald...@gmail.com
on 12 Aug 2014 at 8:46
So I took some more time and tracked my issue down to
fc50f4853af6f149ee839a3f629217eb837a410d
But I'm not sure how that is causing me to lose ending li tags. it seems to be
dealing with tags that are required to be closed and my configuration, which
was a copy of the tiny mce sample with some tweaks to allow empty tags, doesn't
have this configuration.
Original comment by virtuald...@gmail.com
on 14 Aug 2014 at 2:19
Ok the following code seems to be the issue, Although I don't know why it was
the way it was or why it changed to be the else condition rather than the if
condition that always ran.
{{{
- if (true) {
- if (state.empty && isAllowedEmptyTag(rawName)) {
- _printer.printText(" />");
- } else {
- // Must leave CData section first
- if (state.inCData)
- _printer.printText("]]>");
- // XHTML: element names are lower case, DOM will be different
- _printer.printText("</");
- _printer.printText(state.rawName.toLowerCase(Locale.ENGLISH));
- _printer.printText('>');
- }
- } else {
- if (state.empty)
- _printer.printText('>');
- // This element is not empty and that last content was
- // another element, so print a line break before that
- // last element and this element's closing tag.
- // [keith] Provided this is not an anchor.
- // HTML: some elements do not print closing tag (e.g. LI)
- if (htmlName == null || !HTMLdtd.isOnlyOpening(htmlName)) {
- if (_indenting && !state.preserveSpace && state.afterElement)
- _printer.breakLine();
- // Must leave CData section first (Illegal in HTML, but still)
- if (state.inCData)
- _printer.printText("]]>");
- _printer.printText("</");
- _printer.printText(state.rawName);
- _printer.printText('>');
- }
+ String htmlName = rawName;
+
+ if (state.empty)
+ _printer.printText('>');
+ // This element is not empty and that last content was
+ // another element, so print a line break before that
+ // last element and this element's closing tag.
+ // [keith] Provided this is not an anchor.
+ // HTML: some elements do not print closing tag (e.g. LI)
+ if (htmlName == null || !HTMLdtd.isOnlyOpening(htmlName)) {
+ if (_indenting && !state.preserveSpace && state.afterElement)
+ _printer.breakLine();
+ // Must leave CData section first (Illegal in HTML, but still)
+ if (state.inCData)
+ _printer.printText("]]>");
+ _printer.printText("</");
+ _printer.printText(state.rawName);
+ _printer.printText('>');
}
}}}
Original comment by virtuald...@gmail.com
on 14 Aug 2014 at 2:38
Original issue reported on code.google.com by
virtuald...@gmail.com
on 30 Jul 2014 at 5:36