diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-10-06 13:28:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-06 13:28:51 +0200 |
commit | fa8100c088ac990fde08a872816ea7dcfbf54202 (patch) | |
tree | e905192000d9f2d840a3151d6cb8331148f55506 /tests/plugins/resources | |
parent | 86e1bc713fd7fa74d6a17a7687428fa1c6d3c5f2 (diff) | |
parent | cb7940e2deacba66f2510816732be654b255cc70 (diff) | |
download | Shaarli-fa8100c088ac990fde08a872816ea7dcfbf54202.tar.gz Shaarli-fa8100c088ac990fde08a872816ea7dcfbf54202.tar.zst Shaarli-fa8100c088ac990fde08a872816ea7dcfbf54202.zip |
Merge pull request #1212 from ArthurHoaro/hotfix/hashtag-md-escape
Fix hashtags with markdown escape enabled
Diffstat (limited to 'tests/plugins/resources')
-rw-r--r-- | tests/plugins/resources/hashtags.md | 10 | ||||
-rw-r--r-- | tests/plugins/resources/hashtags.raw | 10 | ||||
-rw-r--r-- | tests/plugins/resources/markdown.html | 8 | ||||
-rw-r--r-- | tests/plugins/resources/markdown.md | 2 |
4 files changed, 25 insertions, 5 deletions
diff --git a/tests/plugins/resources/hashtags.md b/tests/plugins/resources/hashtags.md new file mode 100644 index 00000000..46326de3 --- /dev/null +++ b/tests/plugins/resources/hashtags.md | |||
@@ -0,0 +1,10 @@ | |||
1 | [#lol](?addtag=lol) | ||
2 | |||
3 | #test | ||
4 | |||
5 | `#test2` | ||
6 | |||
7 | ``` | ||
8 | bla #bli blo | ||
9 | #bla | ||
10 | ``` | ||
diff --git a/tests/plugins/resources/hashtags.raw b/tests/plugins/resources/hashtags.raw new file mode 100644 index 00000000..9d2dc98a --- /dev/null +++ b/tests/plugins/resources/hashtags.raw | |||
@@ -0,0 +1,10 @@ | |||
1 | #lol | ||
2 | |||
3 | #test | ||
4 | |||
5 | `#test2` | ||
6 | |||
7 | ``` | ||
8 | bla #bli blo | ||
9 | #bla | ||
10 | ``` | ||
diff --git a/tests/plugins/resources/markdown.html b/tests/plugins/resources/markdown.html index f1df4e7e..c3460bf7 100644 --- a/tests/plugins/resources/markdown.html +++ b/tests/plugins/resources/markdown.html | |||
@@ -12,11 +12,11 @@ | |||
12 | <li><a href="http://link.tld">two</a></li> | 12 | <li><a href="http://link.tld">two</a></li> |
13 | <li><a href="http://link.tld">three</a></li> | 13 | <li><a href="http://link.tld">three</a></li> |
14 | <li><a href="http://link.tld">four</a></li> | 14 | <li><a href="http://link.tld">four</a></li> |
15 | <li>foo <a href="?addtag=foobar" title="Hashtag foobar">#foobar</a></li> | 15 | <li>foo <a href="?addtag=foobar">#foobar</a></li> |
16 | </ol></li> | 16 | </ol></li> |
17 | </ol> | 17 | </ol> |
18 | <p><a href="?addtag=foobar" title="Hashtag foobar">#foobar</a> foo <code>lol #foo</code> <a href="?addtag=bar" title="Hashtag bar">#bar</a></p> | 18 | <p><a href="?addtag=foobar">#foobar</a> foo <code>lol #foo</code> <a href="?addtag=bar">#bar</a></p> |
19 | <p>fsdfs <a href="http://link.tld">http://link.tld</a> <a href="?addtag=foobar" title="Hashtag foobar">#foobar</a> <code>http://link.tld</code></p> | 19 | <p>fsdfs <a href="http://link.tld">http://link.tld</a> <a href="?addtag=foobar">#foobar</a> <code>http://link.tld</code></p> |
20 | <pre><code>http://link.tld #foobar | 20 | <pre><code>http://link.tld #foobar |
21 | next #foo</code></pre> | 21 | next #foo</code></pre> |
22 | <p>Block:</p> | 22 | <p>Block:</p> |
@@ -30,4 +30,4 @@ next #foo</code></pre> | |||
30 | <a href="ftp://test.tld/path/?query=value#hash">link</a><br /> | 30 | <a href="ftp://test.tld/path/?query=value#hash">link</a><br /> |
31 | <a href="magnet:test.tld/path/?query=value#hash">link</a><br /> | 31 | <a href="magnet:test.tld/path/?query=value#hash">link</a><br /> |
32 | <a href="http://alert('xss')">link</a><br /> | 32 | <a href="http://alert('xss')">link</a><br /> |
33 | <a href="http://test.tld/path/?query=value#hash">link</a></p></div> \ No newline at end of file | 33 | <a href="http://test.tld/path/?query=value#hash">link</a></p></div> |
diff --git a/tests/plugins/resources/markdown.md b/tests/plugins/resources/markdown.md index b8ebd934..9350a8c7 100644 --- a/tests/plugins/resources/markdown.md +++ b/tests/plugins/resources/markdown.md | |||
@@ -31,4 +31,4 @@ lorem ipsum #foobar http://link.tld | |||
31 | [link](ftp://test.tld/path/?query=value#hash) | 31 | [link](ftp://test.tld/path/?query=value#hash) |
32 | [link](magnet:test.tld/path/?query=value#hash) | 32 | [link](magnet:test.tld/path/?query=value#hash) |
33 | [link](javascript:alert('xss')) | 33 | [link](javascript:alert('xss')) |
34 | [link](other://test.tld/path/?query=value#hash) \ No newline at end of file | 34 | [link](other://test.tld/path/?query=value#hash) |