From 34368fe795b6c7d54c15f292c01ac45219c63c04 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 11 Apr 2023 17:52:41 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B06173=20\HTMLSanitizer::Sanitize=20:=20Fi?= =?UTF-8?q?x=20handling=20only=20svg=5Fsanitizer=20(#450)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/htmlsanitizer.class.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/htmlsanitizer.class.inc.php b/core/htmlsanitizer.class.inc.php index 18bb2574d..68cf63176 100644 --- a/core/htmlsanitizer.class.inc.php +++ b/core/htmlsanitizer.class.inc.php @@ -49,10 +49,9 @@ abstract class HTMLSanitizer $sSanitizerClass = 'HTMLDOMSanitizer'; } else if (false === is_subclass_of($sSanitizerClass, HTMLSanitizer::class)) { if ($sConfigKey === 'html_sanitizer') { - IssueLog::Warning('The configured "'.$sConfigKey.'" class "'.$sSanitizerClass.'" is not a subclass of HTMLSanitizer. Will use HTMLDOMSanitizer as the default sanitizer.'); + IssueLog::Warning('The configured "'.$sConfigKey.'" class "'.$sSanitizerClass.'" is not a subclass of '.HTMLSanitizer::class.'. Will use HTMLDOMSanitizer as the default sanitizer.'); $sSanitizerClass = 'HTMLDOMSanitizer'; - } - if ($sConfigKey === 'svg_sanitizer') { + } else { IssueLog::Error('The configured "'.$sConfigKey.'" class "'.$sSanitizerClass.'" is not a subclass of '.HTMLSanitizer::class.' ! Won\'t sanitize string.'); return $sHTML;