This project is archived and is in readonly mode.
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
-
Jeremy Kemper October 24th, 2008 @ 03:21 AM
- Milestone changed from 2.x to 2.1.3
-
DHH October 26th, 2008 @ 03:54 PM
- State changed from new to committed
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1069 HTML::Node.parse has problems with CDATA Thanks Matt, but saw this after #1257 :)