Fix: img tag did not allow width and height.

Removed swipebox from markdown editor img tag and
updated marked markdown to newest version.

Thanks to hradec and xet7 !

Closes #2956
This commit is contained in:
Lauri Ojansivu 2020-03-06 03:52:12 +02:00
parent a6d702d1ab
commit 2b26bbe78a
216 changed files with 7529 additions and 16839 deletions

View file

@ -57,6 +57,9 @@ const sanitizeXss = (input, options) => {
}
}
}
/* Don't use swipebox on markdown, so that img tag can now use width
* and height parameters. https://github.com/wekan/wekan/issues/2956
* Previously this was added at https://github.com/wekan/wekan/pull/2593
} else if (tag === 'img') {
if (!options.isClosing) {
const src = getAttr('src');
@ -64,6 +67,7 @@ const sanitizeXss = (input, options) => {
return `<a href='${src}' class='swipebox'><img src='${src}' class="attachment-image-preview mCS_img_loaded"></a>`;
}
}
*/
}
return undefined;
},