2
0
forked from Wavyzz/dolibarr

FIX dol_string_nohtmltag when there is html with windows EOL "<br>\r\n"

This commit is contained in:
Laurent Destailleur
2019-12-23 15:45:08 +01:00
parent 7b08ce9fb8
commit 3250b13f4a
2 changed files with 8 additions and 4 deletions

View File

@@ -5389,7 +5389,7 @@ function picto_required()
*/
function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto = 'UTF-8', $strip_tags = 0)
{
if ($removelinefeed == 2) $stringtoclean = preg_replace('/<br[^>]*>\n+/ims', '<br>', $stringtoclean);
if ($removelinefeed == 2) $stringtoclean = preg_replace('/<br[^>]*>(\n|\r)+/ims', '<br>', $stringtoclean);
$temp = preg_replace('/<br[^>]*>/i', "\n", $stringtoclean);
if ($strip_tags) {