diff options
author | Wojtek Kosior <koszko@koszko.org> | 2021-09-08 19:55:33 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2021-09-08 19:55:33 +0200 |
commit | e2d26bad35bbe3876862b482f7963d713238313b (patch) | |
tree | 47e6647c239e8f85fa764cfa5750e0f73e1efd74 /content/page_actions.js | |
parent | 704f2da0673dc714f72b9bb82f6bf648795d4335 (diff) | |
download | browser-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.js | 6 |
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); |