This project is archived and is in readonly mode.

#1257 ✓committed
Jeffrey Hardy

HTML::Node.parse shouldn't blow up on unclosed CDATA sections

Reported by Jeffrey Hardy | October 23rd, 2008 @ 04:41 AM | in 2.1.3

Currently, the HTML scanner's Node.parse will raise an exception if it hits an unclosed CDATA section.

With this patch, if an unclosed CDATA section is encountered and parsing is strict, an exception will be raised. Otherwise, we consider the remainder of the line to be the section contents. This is consistent with how CDATA sections are handled by the tokenizer.

This patch also adds sanitization tests for valid and unclosed CDATA sections.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by