Skip to content

Commit

Permalink
Clean xss.json
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanarijit committed Feb 13, 2024
1 parent bc204d4 commit afff934
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tests/data/html/xss.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div data-foo="bar" data-&gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;="&quot;&gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;"><figure class="featured-image"><picture><source srcset="&quot;&gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;" type="image"/><source srcset="&quot;&gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;" type="image"/><img src="&quot;&gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;" alt="&quot;&gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;"/></picture><figcaption>&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;</figcaption></figure><p><a foo="bar" &quot; onmouseover=&quot;alert(&#x27;pwned!&#x27;)&quot;=&quot;="&quot; onmouseover=&quot;alert(&#x27;pwned!&#x27;)&quot;=&quot;" target="_blank" rel="noopener nofollow">&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;</a></p></div>
<div data-foo="&quot;/&gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;" data-&gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;="foo"><p><a foo="&quot;&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;" &gt;&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;="foo" target="_blank" rel="noopener nofollow">&lt;script&gt;alert(&#x27;pwned!&#x27;);&lt;/script&gt;</a></p></div>
19 changes: 4 additions & 15 deletions tests/data/json/xss.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@
"type": "doc",
"attrs": {
"data": {
"foo": "bar",
"><script>alert('pwned!');</script>": "\"><script>alert('pwned!');</script>"
"foo": "\"/><script>alert('pwned!');</script>",
"><script>alert('pwned!');</script>": "foo"
}
},
"content": [
{
"type": "featuredimage",
"attrs": {
"src": {
"image": "\"><script>alert('pwned!');</script>",
"fallback": "\"><script>alert('pwned!');</script>"
},
"alt": "\"><script>alert('pwned!');</script>",
"caption": "<script>alert('pwned!');</script>"
}
},
{
"type": "paragraph",
"content": [
Expand All @@ -27,8 +16,8 @@
{
"type": "link",
"attrs": {
"\" onmouseover=\"alert('pwned!')\"=\"": "\" onmouseover=\"alert('pwned!')\"=\"",
"foo": "bar"
"><script>alert('pwned!');</script>": "foo",
"foo": "\">alert('pwned!');</script>"
}
}
],
Expand Down

0 comments on commit afff934

Please sign in to comment.