From c29219c96972f42bdc6525baf90811cdf1b5d413 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 8 Dec 2020 13:41:29 +0100 Subject: [PATCH] Fix restrictedTags regex --- www/common/diffMarked.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/diffMarked.js b/www/common/diffMarked.js index 2bbd51dde..71149b59f 100644 --- a/www/common/diffMarked.js +++ b/www/common/diffMarked.js @@ -351,14 +351,14 @@ define([ if (!(node && node.parentElement)) { return; } var parent = node.parentElement; if (!parent) { return; } - console.log('removing %s tag', node.nodeName); + console.debug('removing %s tag', node.nodeName); parent.removeChild(node); }; // Only allow iframe, video and audio with local source var checkSrc = function (root) { if (restrictedTags.indexOf(root.nodeName.toUpperCase()) === -1) { return true; } - return root.getAttribute && /^blob\:/.test(root.getAttribute('src')); + return root.getAttribute && /^(blob\:|\/common\/pdfjs)/.test(root.getAttribute('src')); }; var removeForbiddenTags = function (root) {