You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
There is a problem with function dol_htmlwithnojs since Dolibarr 22 because MAIN_RESTRICTHTML_ONLY_VALID_HTML is activated by default on 1.
htdocs/core/class line 1330
I have the same problem on Dolibarr 21 if i enable const : MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
I don't have this problem on Dolibarr 20 if i enable const : MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
I don't know why I got this when function multiSelectArrayWithCheckbox is called.
Following the function dol_htmlwithnojs I enter in the IF of line 8773 of htdocs/core/lib/functions.lib.php : if (!empty($out) && getDolGlobalString('MAIN_RESTRICTHTML_ONLY_VALID_HTML') && $check != 'restricthtmlallowunvalid')
All of this works well until line 8795 : $out = trim($dom->saveHTML());
Before line 8795 : $out = <?xml encoding="UTF-8"><div class="tricktoremove">
After line 8795 : $out = <!--?xml encoding="UTF-8"><div class="tricktoremove"-->
So preg_replace that is just after won't work.
I am not skilled enough on the DOM side of things but there is something to troubleshoot here.
Thanks
Dolibarr Version
21.0, develop
Environment PHP
8.2
Environment Database
Mariadb 11.7
Steps to reproduce the behavior and expected behavior
Having the constant MAIN_RESTRICTHTML_ONLY_VALID_HTML enabled.
Browsing a page where function multiSelectArrayWithCheckbox is called, like list of invoices
Attached files
No response
The text was updated successfully, but these errors were encountered:
Bug
Hello,
There is a problem with function dol_htmlwithnojs since Dolibarr 22 because MAIN_RESTRICTHTML_ONLY_VALID_HTML is activated by default on 1.
htdocs/core/class line 1330
I have the same problem on Dolibarr 21 if i enable const : MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
I don't have this problem on Dolibarr 20 if i enable const : MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
I don't know why I got this when function multiSelectArrayWithCheckbox is called.
Following the function dol_htmlwithnojs I enter in the IF of line 8773 of htdocs/core/lib/functions.lib.php :
if (!empty($out) && getDolGlobalString('MAIN_RESTRICTHTML_ONLY_VALID_HTML') && $check != 'restricthtmlallowunvalid')
All of this works well until line 8795 :
$out = trim($dom->saveHTML());
Before line 8795 :
$out = <?xml encoding="UTF-8"><div class="tricktoremove">
After line 8795 :
$out = <!--?xml encoding="UTF-8"><div class="tricktoremove"-->
So preg_replace that is just after won't work.
I am not skilled enough on the DOM side of things but there is something to troubleshoot here.
Thanks
Dolibarr Version
21.0, develop
Environment PHP
8.2
Environment Database
Mariadb 11.7
Steps to reproduce the behavior and expected behavior
Having the constant MAIN_RESTRICTHTML_ONLY_VALID_HTML enabled.
Browsing a page where function multiSelectArrayWithCheckbox is called, like list of invoices
Attached files
No response
The text was updated successfully, but these errors were encountered: