diff options
Diffstat (limited to 'tests/safe_mode')
-rw-r--r-- | tests/safe_mode/inline-html-advanced.html | 13 | ||||
-rw-r--r-- | tests/safe_mode/inline-html-comments.html | 20 | ||||
-rw-r--r-- | tests/safe_mode/inline-html-simple.html | 97 | ||||
-rw-r--r-- | tests/safe_mode/script_tags.html | 34 | ||||
-rw-r--r-- | tests/safe_mode/script_tags.txt | 2 | ||||
-rw-r--r-- | tests/safe_mode/unsafe_urls.html | 44 |
6 files changed, 94 insertions, 116 deletions
diff --git a/tests/safe_mode/inline-html-advanced.html b/tests/safe_mode/inline-html-advanced.html index bc59ab1..e9dd2ec 100644 --- a/tests/safe_mode/inline-html-advanced.html +++ b/tests/safe_mode/inline-html-advanced.html @@ -1,14 +1,11 @@ -<p>Simple block on one line: -</p> -<div>foo</div> - -<p>And nested without indentation: -</p> -<div> +<p>Simple block on one line:</p> +<p><div>foo</div></p> +<p>And nested without indentation:</p> +<p><div> <div> <div> foo </div> </div> <div>bar</div> -</div>
\ No newline at end of file +</div></p>
\ No newline at end of file diff --git a/tests/safe_mode/inline-html-comments.html b/tests/safe_mode/inline-html-comments.html index 8deccba..0f1e417 100644 --- a/tests/safe_mode/inline-html-comments.html +++ b/tests/safe_mode/inline-html-comments.html @@ -1,14 +1,8 @@ -<p>Paragraph one. -</p> -<!-- This is a simple comment --> - -<!-- +<p>Paragraph one.</p> +<p><!-- This is a simple comment --></p> +<p><!-- This is another comment. ---> - -<p>Paragraph two. -</p> -<!-- one comment block -- -- with two comments --> - -<p>The end. -</p>
\ No newline at end of file +--></p> +<p>Paragraph two.</p> +<p><!-- one comment block -- -- with two comments --></p> +<p>The end.</p>
\ No newline at end of file diff --git a/tests/safe_mode/inline-html-simple.html b/tests/safe_mode/inline-html-simple.html index 24d16ba..ceaaa90 100644 --- a/tests/safe_mode/inline-html-simple.html +++ b/tests/safe_mode/inline-html-simple.html @@ -1,64 +1,53 @@ -<p>Here's a simple block: -</p> -<div> +<p>Here's a simple block:</p> +<p><div> foo -</div> - -<p>This should be a code block, though: -</p> -<pre><code><div> +</div></p> +<p>This should be a code block, though:</p> +<pre> +<code><div> foo </div> -</code></pre><p>As should this: -</p> -<pre><code><div>foo</div> -</code></pre><p>Now, nested: -</p> -<div> +</code> +</pre> +<p>As should this:</p> +<pre> +<code><div>foo</div> +</code> +</pre> +<p>Now, nested:</p> +<p><div> <div> <div> foo </div> </div> -</div> - -<p>This should just be an HTML comment: -</p> -<!-- Comment --> - -<p>Multiline: -</p> -<!-- +</div></p> +<p>This should just be an HTML comment:</p> +<p><!-- Comment --></p> +<p>Multiline:</p> +<p><!-- Blah Blah ---> - -<p>Code block: -</p> -<pre><code><!-- Comment --> -</code></pre><p>Just plain comment, with trailing spaces on the line: -</p> -<!-- foo --> - -<p>Code: -</p> -<pre><code><hr /> -</code></pre><p>Hr's: -</p> -<hr> - -<hr/> - -<hr /> - -<hr> - -<hr/> - -<hr /> - -<hr class="foo" id="bar" /> - -<hr class="foo" id="bar"/> - -<hr class="foo" id="bar" >
\ No newline at end of file +--></p> +<p>Code block:</p> +<pre> +<code><!-- Comment --> +</code> +</pre> +<p>Just plain comment, with trailing spaces on the line:</p> +<p><!-- foo --></p> +<p>Code:</p> +<pre> +<code><hr /> +</code> +</pre> +<p>Hr's:</p> +<p><hr></p> +<p><hr/></p> +<p><hr /></p> +<p><hr></p> +<p><hr/></p> +<p><hr /></p> +<p><hr class="foo" id="bar" /></p> +<p><hr class="foo" id="bar"/></p> +<p><hr class="foo" id="bar" ></p>
\ No newline at end of file diff --git a/tests/safe_mode/script_tags.html b/tests/safe_mode/script_tags.html index cb2abfa..940329f 100644 --- a/tests/safe_mode/script_tags.html +++ b/tests/safe_mode/script_tags.html @@ -1,26 +1,20 @@ -<p>This should be stripped/escaped in safe_mode. -</p> -<script> +<p>This should be stripped/escaped in safe_mode.</p> +<p><script> alert("Hello world!") -</script> - -<p>With blank lines. -</p> -<script> +</script></p> +<p>With blank lines.</p> +<p><script> alert("Hello world!") -</script> - -<p>Now with some weirdness -</p> -<p><code><script <!-- +</script></p> +<p>Now with some weirdness</p> +<p> +<code><script <!-- alert("Hello world!") -</script <></code>` -</p> -<p>Try another way. -</p> -<script <!-- +</script <></code> `</p> +<p>Try another way.</p> +<p><script <!-- alert("Hello world!") </script <> @@ -30,4 +24,6 @@ This time with blank lines. alert("Hello world!") -</script <>
\ No newline at end of file +</script <> + +</p> diff --git a/tests/safe_mode/script_tags.txt b/tests/safe_mode/script_tags.txt index 55c60e9..44041c2 100644 --- a/tests/safe_mode/script_tags.txt +++ b/tests/safe_mode/script_tags.txt @@ -16,7 +16,7 @@ Now with some weirdness ``<script <!-- alert("Hello world!") -</script <>``` +</script <>`` ` Try another way. diff --git a/tests/safe_mode/unsafe_urls.html b/tests/safe_mode/unsafe_urls.html index 8eda30d..6dabe64 100644 --- a/tests/safe_mode/unsafe_urls.html +++ b/tests/safe_mode/unsafe_urls.html @@ -1,24 +1,26 @@ -<p>These links should be unsafe and not allowed in safe_mode +<p>These links should be unsafe and not allowed in safe_mode</p> +<p> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> +<a href="">link</a> </p> -<p><a href="">link</a> - <a href="">link</a> - <a href="">link</a> - <a href="">link</a> - <a href="">link</a> - <a href="">link</a> - <a href="">link</a> - <a href="">link</a> - <a href="">link</a> - <a href="">link</a> - <a href="">link</a> +<p> +<img alt="img" src="" /> +<a href="">ref</a> +<img alt="imgref" src="" /> </p> -<p><img src="" alt="img"/><a href="">ref</a> - <img src="" alt="imgref"/> +<p>These should work regardless:</p> +<p> +<a href="relative/url.html">relative</a> +<a href="mailto:foo@bar.com">email</a> +<a href="news:some.news.group.com">news scheme</a> +<a href="http://example.com">http link</a> </p> -<p>These should work regardless: -</p> -<p><a href="relative/url.html">relative</a> - <a href="mailto:foo@bar.com">email</a> - <a href="news:some.news.group.com">news scheme</a> - <a href="http://example.com">http link</a> -</p>
\ No newline at end of file |