aboutsummaryrefslogtreecommitdiff
path: root/content/page_actions.js
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-09-08 19:55:33 +0200
committerWojtek Kosior <koszko@koszko.org>2021-09-08 19:55:33 +0200
commite2d26bad35bbe3876862b482f7963d713238313b (patch)
tree47e6647c239e8f85fa764cfa5750e0f73e1efd74 /content/page_actions.js
parent704f2da0673dc714f72b9bb82f6bf648795d4335 (diff)
downloadbrowser-extension-e2d26bad35bbe3876862b482f7963d713238313b.tar.gz
browser-extension-e2d26bad35bbe3876862b482f7963d713238313b.zip
Fix sanitizing of non-HTML XMLDocument's
Diffstat (limited to 'content/page_actions.js')
-rw-r--r--content/page_actions.js6
1 files changed, 3 insertions, 3 deletions
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);