diff options
author | matthew <matthew> | 2008-12-03 18:11:55 +0000 |
---|---|---|
committer | matthew <matthew> | 2008-12-03 18:11:55 +0000 |
commit | 9764a91d7d5cfbaab73a189538333053c6be683e (patch) | |
tree | b8e633ab3cbe52adc8b3936b9c9836711012f311 | |
parent | 8f800ae17583e911357cc58213497a98fa668092 (diff) |
Escape apostrophes correctly.
-rwxr-xr-x | web/ajax.cgi | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/ajax.cgi b/web/ajax.cgi index ca558c17a..43f1f16d8 100755 --- a/web/ajax.cgi +++ b/web/ajax.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: ajax.cgi,v 1.6 2008-10-17 20:19:05 matthew Exp $ +# $Id: ajax.cgi,v 1.7 2008-12-03 18:11:55 matthew Exp $ use strict; use Standard; @@ -68,9 +68,9 @@ sub main { print $q->header(-charset => 'utf-8', -content_type => 'text/javascript'); $pins =~ s/'/\'/g; - $om_list =~ s/'/\'/g; - $am_list =~ s/'/\'/g; - #$f_list =~ s/'/\'/g; + $om_list =~ s/'/\\'/g; + $am_list =~ s/'/\\'/g; + #$f_list =~ s/'/\\'/g; print <<EOF; ({ 'pins': '$pins', |