Skip to content

Commit 44b8878

Browse files
committed
fix: DefaultParser's "Test" not working
Testing settings for Default Parser were broken by way I used DOMPurify. (It doesn't work with Document objects.) See: #1847 (comment)
1 parent bcf7c1e commit 44b8878

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugin/js/DefaultParserUI.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ class DefaultParserUI {
147147
return;
148148
}
149149
return HttpClient.wrapFetch(config.testUrl).then(function (xhr) {
150-
let webPage = { rawDom: util.sanitize(xhr.responseXML) };
150+
let webPage = { rawDom: util.sanitize(xhr.responseXML.querySelector("*")) };
151+
util.setBaseTag(config.testUrl, webPage.rawDom);
151152
let content = parser.findContent(webPage.rawDom);
152153
if (content === null) {
153154
let errorMsg = chrome.i18n.getMessage("errorContentNotFound", [config.testUrl]);

0 commit comments

Comments
 (0)