Desktop, Cli: Improve support for SVG images when importing ENEX files

This commit is contained in:
Laurent Cozic
2020-12-29 15:58:20 +00:00
parent 66a5490b54
commit 143f0b4bc5
6 changed files with 141 additions and 84 deletions
@@ -24,6 +24,10 @@ module.exports = function(markdownIt) {
// url should be normalized at this point, and existing entities are decoded
const str = url.trim().toLowerCase();
if (str.indexOf('data:image/svg+xml,') === 0) {
return true;
}
return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;
};