Howdy,

I filed this as https://github.com/rails/rails/issues/1576
The patch below fixes it for me in 3.0.8 and 3.0.9rc1

HTH,
Greg

>From c7255813b8f61c1aa5f58dc9b92a3f382ef1a3ef Mon Sep 17 00:00:00 2001
From: Greg Berenfield <[email protected]>
Date: Wed, 8 Jun 2011 21:34:27 -0400
Subject: [PATCH] * fixed Issue #1576 which persists in 3.0.9rc1

---
 .../lib/action_view/helpers/javascript_helper.rb   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/
actionpack/lib/action_view/helpers/javascript_helper.rb
index 0f18a4b..9e5e8ed 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -49,7 +49,7 @@ module ActionView
       # Escape carrier returns and single and double quotes for
JavaScript segments.
       def escape_javascript(javascript)
         if javascript
-          javascript.gsub(/(\\|<\/|\r\n|[\n\r"'])/) {|match|
JS_ESCAPE_MAP[match] }
+          (javascript.gsub(/(\\|<\/|\r\n|[\n\r"'])/) {|match|
JS_ESCAPE_MAP[match] }).to_s.html_safe
         else
           ''
         end
--
1.7.5.4

On Jun 8, 9:18 pm, Aaron Patterson <[email protected]> wrote:
> On Wed, Jun 08, 2011 at 05:53:09PM -0700, Jesse Cooke wrote:
> > Issue has been created:https://github.com/rails/rails/issues/1589
>
> Awesome.  Thank you very much!
>
> --
> Aaron Pattersonhttp://tenderlovemaking.com/
>
>  application_pgp-signature_part
> < 1KViewDownload

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to