mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: encode image filename so '[', ']' and '|' doesn't break the markdown
This commit is contained in:
parent
645c32758a
commit
f674b9e86e
2 changed files with 4 additions and 3 deletions
|
@ -123,6 +123,7 @@ var testUploadMarkdown = function(filename) {
|
|||
|
||||
QUnit.test("getUploadMarkdown", assert => {
|
||||
assert.equal(testUploadMarkdown("lolcat.gif"),'');
|
||||
assert.equal(testUploadMarkdown("[foo|bar].png"),'');
|
||||
assert.ok(testUploadMarkdown("important.txt") === '<a class="attachment" href="/uploads/123/abcdef.ext">important.txt</a> (42 Bytes)\n');
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue