Handling Invalid HTML

Chris's Avatar


23 Oct, 2014 02:39 PM

I am pulling in an external XML feed. The "description" node contains a CDATA section that contains invalid HTML. Cascade pulls the feed okay. But when I cannot view the compiled page in Cascade. I receive the error,

An error occurred: An error occurred during the parsing of the assembled page XML: org.xml.sax.SAXParseException: The element type "br" must be terminated by the matching end-tag "

Shouldn't content within a CDATA section be ignored by the parser?

  1. 1 Posted by Ryan Griffith on 27 Oct, 2014 06:53 PM

    Ryan Griffith's Avatar

    Hi Chris,

    I believe when you use the disable-output-escaping attribute, the CDATA tags are omitted and the HTML tags are retained, which is resulting in the invalid XML in this case. I'm not too sure why the XSLT preview isn't kicking back the error as well, because Velocity is as I test for possible solutions.

    Do you have any control over the way the feed is generated? I tried using CDATA and code sections, and combinations of the two, but nothing seemed to work out. I'm not too sure what else you could do other than looking for certain tags and replacing them with a self-closing tag to avoid the invalid XML errors. I'll ask around to see if any one has any ideas as well.

    Please let me know if you have any questions.


  2. Ryan Griffith closed this discussion on 10 Nov, 2014 08:57 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac


26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM