From c8307f58a3c0cc29ad0bfb4263cadea4ebf0ee1b Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 3 Sep 2024 11:15:16 -0400 Subject: [PATCH] Improve `xml-prune` scriptlet Related feedback: https://github.com/uBlockOrigin/uAssets/issues/25164#issuecomment-2326358453 --- assets/resources/scriptlets.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 836a9ef2c..07260358c 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -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 (