Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0

This commit is contained in:
Laurent Destailleur
2024-10-15 15:41:31 +02:00
2 changed files with 12 additions and 1 deletions

View File

@@ -1842,6 +1842,17 @@ function dol_escape_php($stringtoescape, $stringforquotes = 2)
return 'Bad parameter for stringforquotes in dol_escape_php';
}
/**
* Returns text escaped for all protocols (so only alpha chars and numbers)
*
* @param string $stringtoescape String to escape
* @return string Escaped string for XML content.
*/
function dol_escape_all($stringtoescape)
{
return preg_replace('/[^a-z0-9_]/i', '', $stringtoescape);
}
/**
* Returns text escaped for inclusion into a XML string
*