|
|
@ -351,14 +351,14 @@ define([
|
|
|
|
if (!(node && node.parentElement)) { return; }
|
|
|
|
if (!(node && node.parentElement)) { return; }
|
|
|
|
var parent = node.parentElement;
|
|
|
|
var parent = node.parentElement;
|
|
|
|
if (!parent) { return; }
|
|
|
|
if (!parent) { return; }
|
|
|
|
console.log('removing %s tag', node.nodeName);
|
|
|
|
console.debug('removing %s tag', node.nodeName);
|
|
|
|
parent.removeChild(node);
|
|
|
|
parent.removeChild(node);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Only allow iframe, video and audio with local source
|
|
|
|
// Only allow iframe, video and audio with local source
|
|
|
|
var checkSrc = function (root) {
|
|
|
|
var checkSrc = function (root) {
|
|
|
|
if (restrictedTags.indexOf(root.nodeName.toUpperCase()) === -1) { return true; }
|
|
|
|
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) {
|
|
|
|
var removeForbiddenTags = function (root) {
|
|
|
|