From 3e1d5b1748d9657aaba94283a5bd12054e46e40f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Nov 2023 23:17:22 +0100 Subject: [PATCH] Fix for MAIN_RESTRICTHTML_ONLY_VALID_HTML --- htdocs/admin/system/security.php | 2 +- test/phpunit/SecurityTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index 64f08acbcc9..4c65326826e 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -633,7 +633,7 @@ print 'MAIN_SECURITY_MAXFILESIZE_DOWNLOADED = '.getDolGlobalStr print '
'; print 'MAIN_RESTRICTHTML_ONLY_VALID_HTML = '.(getDolGlobalString('MAIN_RESTRICTHTML_ONLY_VALID_HTML') ? '1' : ''.$langs->trans("Undefined").''); -print '   ('.$langs->trans("Recommended").": 1)
"; +print '   ('.$langs->trans("Recommended").": 0 - does not work on HTML5)
"; print '
'; print 'MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = '.(getDolGlobalString('MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY') ? '1' : ''.$langs->trans("Undefined").''); diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index 8c43f3fe577..d95d8da3454 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -1152,7 +1152,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase global $conf; // Set options for cleaning data - $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1; + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 0; // disabled, does not work on HTML5 // Enabled option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY if possible if (extension_loaded('tidy') && class_exists("tidy")) { $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1;