aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-12-14 20:56:03 +0000
committerRick Olson <technoweenie@gmail.com>2006-12-14 20:56:03 +0000
commitd833645cd8609e50f56acaaa7e6dd85e3198a446 (patch)
tree3107b830bac34df9a08b64f1f015c13368853ab8 /actionpack/test/template
parent011f4e7413f1bde83aa62a5fc46afd6957ff9b3e (diff)
downloadrails-d833645cd8609e50f56acaaa7e6dd85e3198a446.tar.gz
rails-d833645cd8609e50f56acaaa7e6dd85e3198a446.tar.bz2
rails-d833645cd8609e50f56acaaa7e6dd85e3198a446.zip
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
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/text_helper_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 37eff78e76..49f5160711 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -204,7 +204,7 @@ class TextHelperTest < Test::Unit::TestCase
def test_sanitize_form
raw = "<form action=\"/foo/bar\" method=\"post\"><input></form>"
result = sanitize(raw)
- assert_equal "&lt;form action='/foo/bar' method='post'><input>&lt;/form>", result
+ assert_equal %(&lt;form action="/foo/bar" method="post"><input>&lt;/form>), result
end
def test_sanitize_plaintext
@@ -216,25 +216,25 @@ class TextHelperTest < Test::Unit::TestCase
def test_sanitize_script
raw = "<script language=\"Javascript\">blah blah blah</script>"
result = sanitize(raw)
- assert_equal "&lt;script language='Javascript'>blah blah blah&lt;/script>", result
+ assert_equal %{&lt;script language="Javascript">blah blah blah&lt;/script>}, result
end
def test_sanitize_js_handlers
raw = %{onthis="do that" <a href="#" onclick="hello" name="foo" onbogus="remove me">hello</a>}
result = sanitize(raw)
- assert_equal %{onthis="do that" <a name='foo' href='#'>hello</a>}, result
+ assert_equal %{onthis="do that" <a name="foo" href="#">hello</a>}, result
end
def test_sanitize_javascript_href
raw = %{href="javascript:bang" <a href="javascript:bang" name="hello">foo</a>, <span href="javascript:bang">bar</span>}
result = sanitize(raw)
- assert_equal %{href="javascript:bang" <a name='hello'>foo</a>, <span>bar</span>}, result
+ assert_equal %{href="javascript:bang" <a name="hello">foo</a>, <span>bar</span>}, result
end
def test_sanitize_image_src
raw = %{src="javascript:bang" <img src="javascript:bang" width="5">foo</img>, <span src="javascript:bang">bar</span>}
result = sanitize(raw)
- assert_equal %{src="javascript:bang" <img width='5'>foo</img>, <span>bar</span>}, result
+ assert_equal %{src="javascript:bang" <img width="5">foo</img>, <span>bar</span>}, result
end
def test_cycle_class