specs/sanitize.rb in amrita2-2.0.0 vs specs/sanitize.rb in amrita2-2.0.1
- old
+ new
@@ -59,9 +59,23 @@
expected = %[<a href="http://www.ruby-lang.org/" title="Ruby's home page"><Ruby></a>]
@t.test_with(data) do |result|
result.should_be_samexml_as(expected)
end
end
+
+ specify "do sanitize double quotes" do
+ data = {
+ :aaa=> {
+ :href=>'http://www.ruby-lang.org/',
+ :title=>"\"Ruby's home page\"",
+ :body=>'<Ruby>'
+ }
+ }
+ expected = %[<a href="http://www.ruby-lang.org/" title=""Ruby's home page""><Ruby></a>]
+ @t.test_with(data) do |result|
+ result.should_be_samexml_as(expected)
+ end
+ end
specify "stop sanitize" do
data = {
:aaa=> {
:href=>'http://www.ruby-lang.org/',