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
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
Rick Olson
d833645cd8
Fix HTML::Node to output double quotes instead of single quotes. Closes #6845 [mitreandy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-14 20:56:03 +00:00
Jamis Buck
3f0952d9df
Fix assert_tag so that :content => "foo" does not match substrings, but only exact strings. Use :content => /foo/ to match substrings. closes #2799
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5086 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-10 02:51:38 +00:00
Jeremy Kemper
db9be58719
Cleanup assert_tag :children counting. Closes #2181 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4915 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-03 16:40:01 +00:00
Rick Olson
7bd6923c7f
allow -'s in tag names for html scanner when scanning AR xml documents
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4251 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-22 18:12:31 +00:00
David Heinemeier Hansson
32b27f997b
Remove insignificant classes from docs
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 05:43:54 +00:00
Jamis Buck
f783d50cf8
Allow assert_tag(:conditions) to match the empty string when a tag has no children. Closes #2959 . [Jamis Buck]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 21:02:10 +00:00
Jamis Buck
f9b199040c
Update html-scanner to handle CDATA sections better. Closes #2970 . [Jamis Buck]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3153 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 20:43:35 +00:00
Jamis Buck
b7ce9c5a87
assert_tag uses exact matches for string conditions, instead of partial matches. Use regex to do partial matches. #2799
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2952 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-09 13:42:05 +00:00
Jamis Buck
e515ba9ecd
Fix the html-scanner to count children correctly, playing nicely with :only, fixes #2181 [patrick@lenz.sh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-18 00:50:52 +00:00
Marcel Molina
a9de9c48c2
Make assert_tag :children count appropriately. Closes #2181 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2500 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-09 01:45:21 +00:00
David Heinemeier Hansson
7f26415d3c
Optimized tag_options to not sort keys, which is no longer necessary when assert_dom_equal and friend is available #1995 [skae]. Added assert_dom_equal and assert_dom_not_equal to compare tags generated by the helpers in an order-indifferent manner #1995 [skae]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-20 07:54:55 +00:00
Jamis Buck
bfdb437508
Updated vendor copy of html-scanner to support better xml parsing
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2131 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-05 09:44:22 +00:00
Jamis Buck
930f33657c
Updated html-scanner so that assert_tag(:tag => "p", :content => "foo") behaves as expected
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 15:05:40 +00:00
Jamis Buck
c23b2a4ad3
Updated vendor copy of html-scanner lib, for bug fixes and optimizations
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-14 10:30:36 +00:00
David Heinemeier Hansson
b167248b21
Fixed the HTML scanner used by assert_tag where a infinite loop could be caused by a stray less-than sign in the input #1270 [Jamis Buck]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1297 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-09 11:20:19 +00:00
David Heinemeier Hansson
8a41ea4588
Only gsub on a string
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-06 18:10:13 +00:00
David Heinemeier Hansson
409bc0970a
Added functionality to assert_tag, so you can now do tests on the siblings of a node, to assert that some element comes before or after the element in question, or just to assert that some element exists as a sibling #1226 [Jamis Buck]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-06 16:42:01 +00:00
David Heinemeier Hansson
7d01005514
Fixed documentation and prepared for release of 0.12
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-18 20:10:11 +00:00
David Heinemeier Hansson
806cf6d76a
Added assert_tag and assert_no_tag as a much improved alternative to the deprecated assert_template_xpath_match #1126 [Jamis Buck]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-17 16:43:48 +00:00