From a6c9aefb4aa37341017359a43d041bcdcacf98e8 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 8 May 2023 10:39:04 +0200 Subject: [PATCH] chore: fix TrustedTypes policy in `chrome://accessibility` (#38179) chore: fix TrustedTypes policy in chrome://accessibility --- shell/browser/ui/webui/accessibility_ui.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index 3f9851e6736f..e8da092393c5 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -321,6 +321,10 @@ ElectronAccessibilityUI::ElectronAccessibilityUI(content::WebUI* web_ui) base::BindRepeating(&HandleAccessibilityRequestCallback, web_ui->GetWebContents()->GetBrowserContext())); + html_source->OverrideContentSecurityPolicy( + network::mojom::CSPDirectiveName::TrustedTypes, + "trusted-types parse-html-subset sanitize-inner-html;"); + web_ui->AddMessageHandler( std::make_unique()); }