1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-16 23:42:39 +01:00

Improve xml-prune scriptlet

Related feedback:
https://github.com/uBlockOrigin/uAssets/issues/25164#issuecomment-2326358453
This commit is contained in:
Raymond Hill 2024-09-03 11:15:16 -04:00
parent 91125d29cf
commit c8307f58a3
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -3347,6 +3347,9 @@ function xmlPrune(
const serializer = new XMLSerializer();
const textout = serializer.serializeToString(thisArg.responseXML);
Object.defineProperty(thisArg, 'responseText', { value: textout });
if ( typeof thisArg.response === 'string' ) {
Object.defineProperty(thisArg, 'response', { value: textout });
}
return;
}
if (