1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Improve xml-prune scriptlet

Related issue:
https://github.com/uBlockOrigin/uAssets/issues/21532
This commit is contained in:
Raymond Hill 2023-12-22 10:15:37 -05:00
parent a770ed957b
commit d7063a052f
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -2977,6 +2977,9 @@ function xmlPrune(
type === '' && thisArg.responseXML instanceof XMLDocument
) {
pruneFromDoc(thisArg.responseXML);
const serializer = new XMLSerializer();
const textout = serializer.serializeToString(thisArg.responseXML);
Object.defineProperty(thisArg, 'responseText', { value: textout });
return;
}
if (