diff options
Diffstat (limited to 'test/test-pages/remove-script-tags')
-rw-r--r-- | test/test-pages/remove-script-tags/expected-metadata.json | 6 | ||||
-rw-r--r-- | test/test-pages/remove-script-tags/expected.html | 11 | ||||
-rw-r--r-- | test/test-pages/remove-script-tags/source.html | 43 |
3 files changed, 60 insertions, 0 deletions
diff --git a/test/test-pages/remove-script-tags/expected-metadata.json b/test/test-pages/remove-script-tags/expected-metadata.json new file mode 100644 index 0000000..2ef0848 --- /dev/null +++ b/test/test-pages/remove-script-tags/expected-metadata.json @@ -0,0 +1,6 @@ +{ + "title": "Remove script tags test", + "byline": null, + "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.", + "readerable": true +} diff --git a/test/test-pages/remove-script-tags/expected.html b/test/test-pages/remove-script-tags/expected.html new file mode 100644 index 0000000..f731d75 --- /dev/null +++ b/test/test-pages/remove-script-tags/expected.html @@ -0,0 +1,11 @@ +<div id="readability-page-1" class="page"> + <div> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> + <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> + <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + <div> + <p>Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> + <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> +</div>
\ No newline at end of file diff --git a/test/test-pages/remove-script-tags/source.html b/test/test-pages/remove-script-tags/source.html new file mode 100644 index 0000000..cacb3df --- /dev/null +++ b/test/test-pages/remove-script-tags/source.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <title>Remove script tags test</title> +</head> +<body> + <script type="text/javascript1.8">alert('wrong')</script> + <article> + <h1>Lorem</h1> + <div> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua.</p> + <p>Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat.</p> + <script> + alert('wrong') + </script> + <p>Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + <script type="text/javascript"> + alert('wrong') + </script> + <h2>Foo</h2> + <div> + <p>Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat.</p> + <script type="text/javascript1.8">alert('wrong')</script> + <p>Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. + <script type="text/vbscript" language="vbscript"> + document.write("super wrong.") + </script> + Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </article> +</body> +</html> |