aboutsummaryrefslogtreecommitdiffstats
path: root/tests/safe_mode/unsafe_urls.html
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-03-18 04:41:33 +0000
committerWaylan Limberg <waylan@gmail.com>2008-03-18 04:41:33 +0000
commit2db5d1c8e469d2943a6a851bc0ff3ede070e448b (patch)
tree4bbe9a96e275fe7edd02c6d6309f1bf60d7495b9 /tests/safe_mode/unsafe_urls.html
parent04cfb29071c4235aca2a4725317d83424ecb5b3a (diff)
downloadmarkdown-2db5d1c8e469d2943a6a851bc0ff3ede070e448b.tar.gz
markdown-2db5d1c8e469d2943a6a851bc0ff3ede070e448b.tar.bz2
markdown-2db5d1c8e469d2943a6a851bc0ff3ede070e448b.zip
Added sanatition of link urls when in safe_mode to no longer allow javascript. Not yet convinced I got all cases, but it's much better than before. Also added some tests although testing framework doesn't currently have the option to run in safe_mode. See [1914685] for more info.
Diffstat (limited to 'tests/safe_mode/unsafe_urls.html')
-rw-r--r--tests/safe_mode/unsafe_urls.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/safe_mode/unsafe_urls.html b/tests/safe_mode/unsafe_urls.html
new file mode 100644
index 0000000..8eda30d
--- /dev/null
+++ b/tests/safe_mode/unsafe_urls.html
@@ -0,0 +1,24 @@
+<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 src="" alt="img"/><a href="">ref</a>
+ <img src="" alt="imgref"/>
+</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