diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 66eb33327..8d14df6f0 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -210,12 +210,12 @@ Quote all characters that are unsafe for inclusion in javascript strings in HTML sub quote_javascript { my ($str) = @_; +$str =~ s/\\/\\\\/g; $str =~ s/"/\\"/g; $str =~ s/'/\\'/g; $str =~ s//\\>/g; $str =~ s/&/\\&/g; -$str =~ s/\\/\\\\/g; return $str; }