mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 11:08:34 +01:00
Try to fix a lot of regression. Add also more phpunit test to avoid them in future.
This commit is contained in:
@@ -312,7 +312,8 @@ function dol_string_nospecial($str,$newstr='_',$badchars='')
|
||||
function dol_escape_js($stringtoescape)
|
||||
{
|
||||
// escape quotes and backslashes, newlines, etc.
|
||||
return strtr($stringtoescape, array("'"=>"\\'",'\\'=>'\\\\',"'"=>"\\'",'"'=>"\\'","\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
|
||||
$substitjs=array("'"=>"\\'",'\\'=>'\\\\',"'"=>"\\'",'"'=>"\\'","\r"=>'\\r',"\n"=>'\\n','</'=>'<\/');
|
||||
return strtr($stringtoescape, $substitjs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user