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

@ -1,4 +1,4 @@
/* globals marked, unfetch, ES6Promise */
/* globals marked, unfetch, ES6Promise, Promise */ // eslint-disable-line no-redeclare
if (!self.Promise) {
self.importScripts('https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js');
self.Promise = ES6Promise;
@ -11,15 +11,15 @@ if (!self.fetch) {
var versionCache = {};
var currentVersion;
onunhandledrejection = function (e) {
onunhandledrejection = function(e) {
throw e.reason;
};
onmessage = function (e) {
onmessage = function(e) {
if (e.data.version === currentVersion) {
parse(e);
} else {
loadVersion(e.data.version).then(function () {
loadVersion(e.data.version).then(function() {
parse(e);
});
}
@ -87,13 +87,13 @@ function loadVersion(ver) {
promise = Promise.resolve(versionCache[ver]);
} else {
promise = fetch(ver)
.then(function (res) { return res.text(); })
.then(function (text) {
.then(function(res) { return res.text(); })
.then(function(text) {
versionCache[ver] = text;
return text;
});
}
return promise.then(function (text) {
return promise.then(function(text) {
try {
// eslint-disable-next-line no-new-func
Function(text)();