Commit Graph

12 Commits

Author SHA1 Message Date
Jeffrey Hardy 3bcadc9290 Fix incorrect closing CDATA delimiter. Add tests for CDATA nodes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-10-23 19:16:26 -07:00
Jeffrey Hardy 1a18227261 Fix that HTML::Node.parse would blow up on unclosed CDATA sections.
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 HTML::Tokenizer#scan_tag.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-10-23 19:16:12 -07:00
Jimmy Baker 670e22e372 Patched HTML::Document#initialize call to Node.parse so that it includes the strict argument. [#330] 2008-06-24 23:11:35 -07:00
David Heinemeier Hansson c57254d449 Fixed HTML::Tokenizer (used in sanitize helper) didnt handle unclosed CDATA tags (closes #10071) [esad, packagethief]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9111 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 19:45:32 +00:00
Jeremy Kemper 3a62e0e868 Ruby 1.9 compat: check dom equality
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8587 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:09:06 +00:00
Jeremy Kemper 9d755f1983 require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Rick Olson 14f6440ed6 Correct indentation in a couple spots. Closes #10671 [l.guidi, rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8527 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 19:24:44 +00:00
Rick Olson e781faddca Fix HTML Sanitizer to allow trailing spaces in CSS style attributes. Closes #10566 [wesley.moxam]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8485 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-23 21:07:20 +00:00
David Heinemeier Hansson 3a622d0045 Fix broken test (closes #10364) [chuyeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-05 02:34:36 +00:00
Rick Olson 1af084ecda Refactor sanitizer helpers into HTML classes and make it easy to swap them out with custom implementations. Closes #10129. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-26 03:45:54 +00:00
Michael Koziarski 9b468f4cd7 [html-scanner] Fix parsing of empty tags. Closes #7641. [anthony.bailey]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7528 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-21 20:45:49 +00:00
Rick Olson 19fbb31464 Add much-needed html-scanner tests. Fixed CDATA parsing bug. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6117 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 20:04:40 +00:00