Skip to content

Commit

Permalink
Tests for sanitization of url ref's in SVG attributes.
Browse files Browse the repository at this point in the history
--HG--
extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401064
  • Loading branch information
distler committed Oct 27, 2007
1 parent 8cc384f commit 8ebb11a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions sanitizer/tests1.dat
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,37 @@
"input": "<img src='foo' title='\"foo\" bar' />",
"rexml": "<img src='foo' title='\"foo\" bar' />",
"output": "<img title='&quot;foo&quot; bar' src='foo'/>"
},

{
"name": "uri_refs_in_svg_attributes",
"input": "<rect fill='url(#foo)' />",
"rexml": "<rect fill='url(#foo)'></rect>",
"xhtml": "<rect fill='url(#foo)'></rect>",
"output": "<rect fill='url(#foo)'/>"
},

{
"name": "absolute_uri_refs_in_svg_attributes",
"input": "<rect fill='url(http:https://bad.com/)' />",
"rexml": "<rect></rect>",
"xhtml": "<rect></rect>",
"output": "<rect/>"
},

{
"name": "uri_ref_with_space_in svg_attribute",
"input": "<rect fill=\"url(\n#foo)\" />",
"rexml": "<rect fill=\'url(\n#foo)\'></rect>",
"xhtml": "<rect fill=\'url(\n#foo)\'></rect>",
"output": "<rect fill=\'url(\n#foo)\'/>"
},

{
"name": "absolute_uri_ref_with_space_in svg_attribute",
"input": "<rect fill=\"url(\nhttp:https://bad.com/)\" />",
"rexml": "<rect></rect>",
"xhtml": "<rect></rect>",
"output": "<rect/>"
}
]

0 comments on commit 8ebb11a

Please sign in to comment.