mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 19:18:22 +01:00
Debug v19
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user