From e2d26bad35bbe3876862b482f7963d713238313b Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 8 Sep 2021 19:55:33 +0200 Subject: Fix sanitizing of non-HTML XMLDocument's --- content/page_actions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'content/page_actions.js') diff --git a/content/page_actions.js b/content/page_actions.js index 8057541..040b4ab 100644 --- a/content/page_actions.js +++ b/content/page_actions.js @@ -11,7 +11,7 @@ * IMPORT browser * IMPORT report_script * IMPORT report_settings - * IMPORT report_content_type + * IMPORT report_document_type * IMPORTS_END */ @@ -70,8 +70,8 @@ function handle_page_actions(script_nonce, policy_received_cb, doc_ready_promise) { policy_received_callback = policy_received_cb; url = document.URL; - is_html = /html/.test(document.contentType); - report_content_type(document.contentType); + is_html = document instanceof HTMLDocument; + report_document_type(is_html); doc_ready_promise.then(document_ready); -- cgit v1.2.3