mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
this fixes #845
This commit is contained in:
parent
e7daeb3edc
commit
b859d22c83
@ -74,6 +74,9 @@ vAPI.insertHTML = (function() {
|
|||||||
const parser = Components.classes['@mozilla.org/parserutils;1']
|
const parser = Components.classes['@mozilla.org/parserutils;1']
|
||||||
.getService(Components.interfaces.nsIParserUtils);
|
.getService(Components.interfaces.nsIParserUtils);
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/845
|
||||||
|
// Apparently dashboard pages execute with `about:blank` principal.
|
||||||
|
|
||||||
return function(node, html) {
|
return function(node, html) {
|
||||||
while ( node.firstChild ) {
|
while ( node.firstChild ) {
|
||||||
node.removeChild(node.firstChild);
|
node.removeChild(node.firstChild);
|
||||||
@ -83,7 +86,7 @@ vAPI.insertHTML = (function() {
|
|||||||
html,
|
html,
|
||||||
parser.SanitizerAllowStyle,
|
parser.SanitizerAllowStyle,
|
||||||
false,
|
false,
|
||||||
Services.io.newURI(document.baseURI, null, null),
|
Services.io.newURI('about:blank'/*document.baseURI*/, null, null),
|
||||||
document.documentElement
|
document.documentElement
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user