1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-22 18:32:45 +01:00
This commit is contained in:
gorhill 2015-10-19 13:13:22 -04:00
parent e7daeb3edc
commit b859d22c83

View File

@ -74,6 +74,9 @@ vAPI.insertHTML = (function() {
const parser = Components.classes['@mozilla.org/parserutils;1']
.getService(Components.interfaces.nsIParserUtils);
// https://github.com/gorhill/uBlock/issues/845
// Apparently dashboard pages execute with `about:blank` principal.
return function(node, html) {
while ( node.firstChild ) {
node.removeChild(node.firstChild);
@ -83,7 +86,7 @@ vAPI.insertHTML = (function() {
html,
parser.SanitizerAllowStyle,
false,
Services.io.newURI(document.baseURI, null, null),
Services.io.newURI('about:blank'/*document.baseURI*/, null, null),
document.documentElement
));
};