diff options
author | Waylan Limberg <waylan@gmail.com> | 2009-05-30 22:31:55 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2009-06-05 22:25:51 -0400 |
commit | 8b430d251b2518fa3303d7027f50268e0254b7a1 (patch) | |
tree | c9265f6ce7024d400b6c8bb58c26bda6a97f86d5 /tests/safe_mode | |
parent | cc452998dc1af441cf3f9c5d0c7287cb5de48c4a (diff) | |
download | markdown-8b430d251b2518fa3303d7027f50268e0254b7a1.tar.gz markdown-8b430d251b2518fa3303d7027f50268e0254b7a1.tar.bz2 markdown-8b430d251b2518fa3303d7027f50268e0254b7a1.zip |
Moves tests to a subdir of the markdown lib.
Diffstat (limited to 'tests/safe_mode')
-rw-r--r-- | tests/safe_mode/inline-html-advanced.html | 11 | ||||
-rw-r--r-- | tests/safe_mode/inline-html-advanced.txt | 14 | ||||
-rw-r--r-- | tests/safe_mode/inline-html-comments.html | 8 | ||||
-rw-r--r-- | tests/safe_mode/inline-html-comments.txt | 13 | ||||
-rw-r--r-- | tests/safe_mode/inline-html-simple.html | 45 | ||||
-rw-r--r-- | tests/safe_mode/inline-html-simple.txt | 69 | ||||
-rw-r--r-- | tests/safe_mode/script_tags.html | 28 | ||||
-rw-r--r-- | tests/safe_mode/script_tags.txt | 33 | ||||
-rw-r--r-- | tests/safe_mode/test.cfg | 2 | ||||
-rw-r--r-- | tests/safe_mode/unsafe_urls.html | 20 | ||||
-rw-r--r-- | tests/safe_mode/unsafe_urls.txt | 27 |
11 files changed, 0 insertions, 270 deletions
diff --git a/tests/safe_mode/inline-html-advanced.html b/tests/safe_mode/inline-html-advanced.html deleted file mode 100644 index e9dd2ec..0000000 --- a/tests/safe_mode/inline-html-advanced.html +++ /dev/null @@ -1,11 +0,0 @@ -<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></p>
\ No newline at end of file diff --git a/tests/safe_mode/inline-html-advanced.txt b/tests/safe_mode/inline-html-advanced.txt deleted file mode 100644 index 9d71ddc..0000000 --- a/tests/safe_mode/inline-html-advanced.txt +++ /dev/null @@ -1,14 +0,0 @@ -Simple block on one line: - -<div>foo</div> - -And nested without indentation: - -<div> -<div> -<div> -foo -</div> -</div> -<div>bar</div> -</div> diff --git a/tests/safe_mode/inline-html-comments.html b/tests/safe_mode/inline-html-comments.html deleted file mode 100644 index 0f1e417..0000000 --- a/tests/safe_mode/inline-html-comments.html +++ /dev/null @@ -1,8 +0,0 @@ -<p>Paragraph one.</p> -<p><!-- This is a simple comment --></p> -<p><!-- - This is another comment. ---></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-comments.txt b/tests/safe_mode/inline-html-comments.txt deleted file mode 100644 index 41d830d..0000000 --- a/tests/safe_mode/inline-html-comments.txt +++ /dev/null @@ -1,13 +0,0 @@ -Paragraph one. - -<!-- This is a simple comment --> - -<!-- - This is another comment. ---> - -Paragraph two. - -<!-- one comment block -- -- with two comments --> - -The end. diff --git a/tests/safe_mode/inline-html-simple.html b/tests/safe_mode/inline-html-simple.html deleted file mode 100644 index ad19a77..0000000 --- a/tests/safe_mode/inline-html-simple.html +++ /dev/null @@ -1,45 +0,0 @@ -<p>Here's a simple block:</p> -<p><div> - foo -</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> -<p><div> - <div> - <div> - foo - </div> - </div> -</div></p> -<p>This should just be an HTML comment:</p> -<p><!-- Comment --></p> -<p>Multiline:</p> -<p><!-- -Blah -Blah ---></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/inline-html-simple.txt b/tests/safe_mode/inline-html-simple.txt deleted file mode 100644 index 14aa2dc..0000000 --- a/tests/safe_mode/inline-html-simple.txt +++ /dev/null @@ -1,69 +0,0 @@ -Here's a simple block: - -<div> - foo -</div> - -This should be a code block, though: - - <div> - foo - </div> - -As should this: - - <div>foo</div> - -Now, nested: - -<div> - <div> - <div> - foo - </div> - </div> -</div> - -This should just be an HTML comment: - -<!-- Comment --> - -Multiline: - -<!-- -Blah -Blah ---> - -Code block: - - <!-- Comment --> - -Just plain comment, with trailing spaces on the line: - -<!-- foo --> - -Code: - - <hr /> - -Hr's: - -<hr> - -<hr/> - -<hr /> - -<hr> - -<hr/> - -<hr /> - -<hr class="foo" id="bar" /> - -<hr class="foo" id="bar"/> - -<hr class="foo" id="bar" > - diff --git a/tests/safe_mode/script_tags.html b/tests/safe_mode/script_tags.html deleted file mode 100644 index df63ffc..0000000 --- a/tests/safe_mode/script_tags.html +++ /dev/null @@ -1,28 +0,0 @@ -<p>This should be stripped/escaped in safe_mode.</p> -<p><script> -alert("Hello world!") -</script></p> -<p>With blank lines.</p> -<p><script> - -alert("Hello world!") - -</script></p> -<p>Now with some weirdness</p> -<p><code><script <!-- -alert("Hello world!") -</script <></code> `</p> -<p>Try another way.</p> -<p><script <!-- -alert("Hello world!") -</script <> - -This time with blank lines. - -<script <!-- - -alert("Hello world!") - -</script <> - -</p>
\ No newline at end of file diff --git a/tests/safe_mode/script_tags.txt b/tests/safe_mode/script_tags.txt deleted file mode 100644 index 44041c2..0000000 --- a/tests/safe_mode/script_tags.txt +++ /dev/null @@ -1,33 +0,0 @@ -This should be stripped/escaped in safe_mode. - -<script> -alert("Hello world!") -</script> - -With blank lines. - -<script> - -alert("Hello world!") - -</script> - -Now with some weirdness - -``<script <!-- -alert("Hello world!") -</script <>`` ` - -Try another way. - -<script <!-- -alert("Hello world!") -</script <> - -This time with blank lines. - -<script <!-- - -alert("Hello world!") - -</script <> diff --git a/tests/safe_mode/test.cfg b/tests/safe_mode/test.cfg deleted file mode 100644 index d23e418..0000000 --- a/tests/safe_mode/test.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -safe_mode=escape diff --git a/tests/safe_mode/unsafe_urls.html b/tests/safe_mode/unsafe_urls.html deleted file mode 100644 index e617f35..0000000 --- a/tests/safe_mode/unsafe_urls.html +++ /dev/null @@ -1,20 +0,0 @@ -<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><img alt="img" src="" /> -<a href="">ref</a> -<img alt="imgref" src="" /></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 diff --git a/tests/safe_mode/unsafe_urls.txt b/tests/safe_mode/unsafe_urls.txt deleted file mode 100644 index 7bfd81d..0000000 --- a/tests/safe_mode/unsafe_urls.txt +++ /dev/null @@ -1,27 +0,0 @@ -These links should be unsafe and not allowed in safe_mode - -[link](javascript:alert%28'Hello%20world!'%29) -[link](vbscript:msgbox%28%22Hello%20world!%22%29) -[link](livescript:alert%28'Hello%20world!'%29) -[link](mocha:[code]) -[link](jAvAsCrIpT:alert%28'Hello%20world!'%29) -[link](ja vas cr ipt:alert%28'Hello%20world!'%29) -[link](ja vas cr ipt:alert%28'Hello%20world!'%29) -[link](ja vas cr ipt:alert%28'Hello%20world!'%29) -[link](ja%09 %0Avas cr
ipt:alert%28'Hello%20world!'%29) -[link](ja%20vas%20cr%20ipt:alert%28'Hello%20world!'%29) -[link](live%20script:alert%28'Hello%20world!'%29) - -![img](javascript:alert%29'XSS'%29) -[ref][] -![imgref][] - -[ref]: javascript:alert%29'XSS'%29 -[imgref]: javascript:alert%29'XSS'%29 - -These should work regardless: - -[relative](relative/url.html) -[email](mailto:foo@bar.com) -[news scheme](news:some.news.group.com) -[http link](http://example.com) |