From 86ceea054f5f85157b04473bac5bfb6ff86ca31f Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 25 May 2017 14:52:42 +0200 Subject: Add a whitelist of protocols for URLs - for Shaare - for markdown description links and images Not whitelisted protocols will be replaced by `http://` --- tests/plugins/resources/markdown.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/plugins/resources/markdown.md') diff --git a/tests/plugins/resources/markdown.md b/tests/plugins/resources/markdown.md index 0b8be7c5..b8ebd934 100644 --- a/tests/plugins/resources/markdown.md +++ b/tests/plugins/resources/markdown.md @@ -21,4 +21,14 @@ Block: ``` lorem ipsum #foobar http://link.tld #foobar http://link.tld -``` \ No newline at end of file +``` + +[link](?123456) +![link](/img/train.png) +[link](test.tld/path/?query=value#hash) +[link](http://test.tld/path/?query=value#hash) +[link](https://test.tld/path/?query=value#hash) +[link](ftp://test.tld/path/?query=value#hash) +[link](magnet:test.tld/path/?query=value#hash) +[link](javascript:alert('xss')) +[link](other://test.tld/path/?query=value#hash) \ No newline at end of file -- cgit v1.2.3