Try to fix a lot of regression. Add also more phpunit test to avoid them in future.

This commit is contained in:
Laurent Destailleur
2011-05-01 20:53:46 +00:00
parent a0c141294f
commit 0053ecdab9
5 changed files with 20 additions and 23 deletions

View File

@@ -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("&#039;"=>"\\'",'\\'=>'\\\\',"'"=>"\\'",'"'=>"\\'","\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
$substitjs=array("&#039;"=>"\\'",'\\'=>'\\\\',"'"=>"\\'",'"'=>"\\'","\r"=>'\\r',"\n"=>'\\n','</'=>'<\/');
return strtr($stringtoescape, $substitjs);
}