FIX: Add the hr balise to detect if the text is a html content

This commit is contained in:
kkhelifa
2023-06-13 14:24:30 +02:00
parent ea167579ca
commit b1f13ebf92

View File

@@ -7681,11 +7681,11 @@ function dol_textishtml($msg, $option = 0)
return true;
} elseif (preg_match('/<(b|em|i|u)(\s+[^>]+)?>/i', $msg)) {
return true;
} elseif (preg_match('/<br\/>/i', $msg)) {
} elseif (preg_match('/<(br|hr)\/>/i', $msg)) {
return true;
} elseif (preg_match('/<(br|div|font|li|p|span|strong|table)>/i', $msg)) {
} elseif (preg_match('/<(br|hr|div|font|li|p|span|strong|table)>/i', $msg)) {
return true;
} elseif (preg_match('/<(br|div|font|li|p|span|strong|table)\s+[^<>\/]*\/?>/i', $msg)) {
} elseif (preg_match('/<(br|hr|div|font|li|p|span|strong|table)\s+[^<>\/]*\/?>/i', $msg)) {
return true;
} elseif (preg_match('/<img\s+[^<>]*src[^<>]*>/i', $msg)) {
return true; // must accept <img src="http://example.com/aaa.png" />