Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Fix incorrect code in Closure mocking framework documentation
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=259790272
  • Loading branch information
shicks committed Jul 26, 2019
1 parent 0cbbd03 commit 9a198b5
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions closure/goog/html/sanitizer/html_test_vectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ goog.html.htmlTestVectors.HTML_TEST_VECTORS = [
acceptable: [
"",
],
name: "body_onload.html.test"},
name: "body_onload"},
{input: "<iframe src=\"javascript:alert('xss')\">",
acceptable: [
"<iframe></iframe>",
"",
],
name: "iframe_src.html.test"},
name: "iframe_src"},
{input: "<img src=\"javascript:xss=true;\">",
acceptable: [
"<img src=\"javascript:void(0);\">",
Expand All @@ -37,15 +37,15 @@ goog.html.htmlTestVectors.HTML_TEST_VECTORS = [
"<img>",
"<img />",
],
name: "img.html.test"},
name: "img"},
{input: "<img \"\"\"><script>alert('xss')</script>\">",
acceptable: [
"<img/>&#34;&gt;",
"<img>&quot;&gt;",
"<img>\"&gt;",
"<img />\"&gt;",
],
name: "img_malformed.html.test"},
name: "img_malformed"},
{input: "<img src=x onerror=\"alert('xxs')\">",
acceptable: [
"<img src=\"x\"/>",
Expand All @@ -54,7 +54,7 @@ goog.html.htmlTestVectors.HTML_TEST_VECTORS = [
"<img src=\"javascript:void(0);\">",
"<img />",
],
name: "img_onerror.html.test"},
name: "img_onerror"},
{input: "<img src=javascript:alert(&quot;XSS&quot;)>",
acceptable: [
"<img src=\"javascript:void(0);\">",
Expand All @@ -63,12 +63,12 @@ goog.html.htmlTestVectors.HTML_TEST_VECTORS = [
"<img>",
"<img />",
],
name: "img_quot.html.test"},
name: "img_quot"},
{input: "<style type=\"text/javascript\">alert('xss');</style>",
acceptable: [
"",
],
name: "img_style.html.test"},
name: "img_style"},
{input: "<img src=\"jav&#x09;ascript:alert('xss');\">",
acceptable: [
"<img src=\"javascript:void(0);\">",
Expand All @@ -77,68 +77,68 @@ goog.html.htmlTestVectors.HTML_TEST_VECTORS = [
"<img>",
"<img />",
],
name: "img_tab.html.test"},
name: "img_tab"},
{input: "<input type=\"image\" src=\"javascript:alert('xss');\">",
acceptable: [
"",
"<input type=\"image\">",
"<input type=\"image\" />",
],
name: "input.html.test"},
name: "input"},
{input: "javascript:/*--></title></style></textarea></script></xmp><svg/onload='+/\"/+/onmouseover=1/+/[*/[]/+alert(xss)//'>",
acceptable: [
"javascript:/*--&gt;",
],
name: "polygot.html.test"},
name: "polygot"},
{input: "<LINK REL=\"stylesheet\" HREF=\"http://google.com/xss.css\">",
acceptable: [
"<link rel=\"stylesheet\"/>",
"<link rel=stylesheet>",
"",
],
name: "remote_stylesheet.html.test"},
name: "remote_stylesheet"},
{input: "<STYLE>@import'http://google.com/xss.css';</STYLE>",
acceptable: [
"",
],
name: "remote_stylesheet2.html.test"},
name: "remote_stylesheet2"},
{input: "<script>alert('xss')</script>",
acceptable: [
"",
],
name: "script_alert.html.test"},
name: "script_alert"},
{input: "<<script>alert('xss');//<</script>",
acceptable: [
"&lt;",
],
name: "script_extra.html.test"},
name: "script_extra"},
{input: "<<s<script>script>alert()<</script>/script>",
acceptable: [
"&lt;",
"&lt;script&gt;alert()&lt;/script&gt;",
"&lt;<span>script&gt;alert()&lt;/script&gt;</span>",
],
name: "script_inception.html.test"},
name: "script_inception"},
{input: "<script/xss src=\"http://google.com/xss.js\"><\\/script>",
acceptable: [
"",
],
name: "script_nondigit.html.test"},
name: "script_nondigit"},
{input: "<script src=\"http://google.com/xss.js\"< b >",
acceptable: [
"",
],
name: "script_open.html.test"},
name: "script_open"},
{input: "<script src=\"http://google.com/xss.js\"></script>",
acceptable: [
"",
],
name: "script_src.html.test"},
name: "script_src"},
{input: "</title><script>alert();</script>",
acceptable: [
"",
],
name: "script_title.html.test"},
name: "script_title"},
{input: "<img src=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41;>",
acceptable: [
"<img src=\"javascript:void(0);\">",
Expand All @@ -147,5 +147,5 @@ goog.html.htmlTestVectors.HTML_TEST_VECTORS = [
"<img>",
"<img />",
],
name: "unicode.html.test"},
name: "unicode"},
];

0 comments on commit 9a198b5

Please sign in to comment.