From 7974633bbaa3ee2baf6cf6439d9c79e4a5874ab0 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 30 Jul 2020 11:36:33 +0900 Subject: [PATCH] Fix EmbeddedCSS being ignored, stripped by sanitizer --- BTCPayServer/Hosting/BTCPayServerServices.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/BTCPayServer/Hosting/BTCPayServerServices.cs b/BTCPayServer/Hosting/BTCPayServerServices.cs index 746b1f3da..f0e86abc2 100644 --- a/BTCPayServer/Hosting/BTCPayServerServices.cs +++ b/BTCPayServer/Hosting/BTCPayServerServices.cs @@ -172,6 +172,7 @@ namespace BTCPayServer.Hosting htmlSanitizer.RemovingStyle += (sender, args) => { args.Cancel = true; }; htmlSanitizer.AllowedAttributes.Add("class"); htmlSanitizer.AllowedTags.Add("iframe"); + htmlSanitizer.AllowedTags.Add("style"); htmlSanitizer.AllowedTags.Remove("img"); htmlSanitizer.AllowedAttributes.Add("webkitallowfullscreen"); htmlSanitizer.AllowedAttributes.Add("allowfullscreen");