Debug v19

This commit is contained in:
Laurent Destailleur
2023-10-13 20:07:39 +02:00
parent 9f13d74534
commit d11543c806
4 changed files with 92 additions and 44 deletions

View File

@@ -1594,6 +1594,21 @@ function dol_escape_json($stringtoescape)
return str_replace('"', '\"', $stringtoescape);
}
/**
* Returns text escaped for inclusion into a php string, build with double quotes "
*
* @param string $stringtoescape String to escape
* @return string Escaped string for json content.
*/
function dol_escape_php($stringtoescape)
{
if (is_null($stringtoescape)) {
return '';
}
return str_replace('"', "'", $stringtoescape);
}
/**
* Return a string label ready to be output on HTML content
* To use text inside an attribute, use can use only dol_escape_htmltag()