Skip to content
Browse files

escape newlines in spice return

  • Loading branch information...
1 parent c4b1d1e commit 8c6f29b82b967c6952251ce5a79f92141f2f113c @crazedpsyc crazedpsyc committed Jun 16, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/App/DuckPAN/Web.pm
View
1 lib/App/DuckPAN/Web.pm
@@ -96,6 +96,7 @@ sub request {
$body = $rewrite->callback.'('.$body.');';
}
elsif ($rewrite->wrap_string_callback && $rewrite->callback) {
+ $body =~ s/(["\n])/\\$1/g;
$body = $rewrite->callback.'("'.$body.'");';
}
$response->code($res->code);

0 comments on commit 8c6f29b

Please sign in to comment.
Something went wrong with that request. Please try again.