2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00

BUGFIX: Allow links to images with absolute URLs as well as parens

This commit is contained in:
Robin Ward 2014-02-20 15:23:10 -05:00
parent b8448b6e39
commit 7716d940a0
2 changed files with 13 additions and 4 deletions

View file

@ -379,5 +379,11 @@ test("urlAllowed", function() {
allowed("http://eviltrout.com/evil/trout", "allows full urls");
allowed("https://eviltrout.com/evil/trout", "allows https urls");
allowed("//eviltrout.com/evil/trout", "allows protocol relative urls");
});
test("images", function() {
cooked("[![folksy logo](http://folksy.com/images/folksy-colour.png)](http://folksy.com/)",
"<p><a href=\"http://folksy.com/\"><img src=\"http://folksy.com/images/folksy-colour.png\" alt=\"folksy logo\"/></a></p>",
"It allows images with links around them");
});