mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-12 10:52:37 +01:00
CI
This commit is contained in:
@@ -2244,10 +2244,10 @@ function dolSlugify($stringtoslugify)
|
||||
/**
|
||||
* Returns text escaped for inclusion into javascript code
|
||||
*
|
||||
* @param string $stringtoescape String to escape
|
||||
* @param int<0,3> $mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string", 3=Escape ' and " with \
|
||||
* @param int $noescapebackslashn 0=Escape also \n. 1=Do not escape \n.
|
||||
* @return string Escaped string. Both ' and " are escaped into ' if they are escaped.
|
||||
* @param int|string $stringtoescape String to escape
|
||||
* @param int<0,3> $mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string", 3=Escape ' and " with \
|
||||
* @param int $noescapebackslashn 0=Escape also \n. 1=Do not escape \n.
|
||||
* @return string Escaped string. Both ' and " are escaped into ' if they are escaped.
|
||||
*/
|
||||
function dol_escape_js($stringtoescape, $mode = 0, $noescapebackslashn = 0)
|
||||
{
|
||||
@@ -2273,7 +2273,7 @@ function dol_escape_js($stringtoescape, $mode = 0, $noescapebackslashn = 0)
|
||||
$substitjs["'"] = "\\'";
|
||||
$substitjs['"'] = "\\\"";
|
||||
}
|
||||
return strtr($stringtoescape, $substitjs);
|
||||
return strtr((string) $stringtoescape, $substitjs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user