]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - lib/CGI/Ex/JSONDump.pm
CGI::Ex 2.06
[chaz/p5-CGI-Ex] / lib / CGI / Ex / JSONDump.pm
index 69222bf85bdeb46ab150908394c75e65093d277e..92d08379e9537d7c4b83c78528c7391a19b8b87d 100644 (file)
@@ -17,7 +17,7 @@ use strict;
 use base qw(Exporter);
 
 BEGIN {
-    $VERSION  = '2.05';
+    $VERSION  = '2.06';
 
     @EXPORT = qw(JSONDump);
     @EXPORT_OK = @EXPORT;
@@ -117,7 +117,7 @@ sub js_escape {
     utf8::decode($str) if $self->{'utf8'} && &utf8::decode;
 
     ### escape <html> and </html> tags in the text
-    $str =~ s{(</? (?: htm | scrip | !-))}{$1$quote+$quote}gx;
+    $str =~ s{(</? (?: htm | scrip | !-) | --(?=>) )}{$1$quote+$quote}gx;
 
     ### add nice newlines (unless pretty is off)
     if ($self->{'str_nl'} && length($str) > 80) {
This page took 0.019079 seconds and 4 git commands to generate.