diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-10-09 00:45:41 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-10-09 00:45:41 +0000 |
commit | ca35e264a43790ec96306388cbe0a078a5c355eb (patch) | |
tree | 199f2c396512f502e737cd5ae71fcc1d00dc29a0 /actionpack | |
parent | 31d3048706eee65673eeebe28d76064632420a97 (diff) | |
download | rails-ca35e264a43790ec96306388cbe0a078a5c355eb.tar.gz rails-ca35e264a43790ec96306388cbe0a078a5c355eb.tar.bz2 rails-ca35e264a43790ec96306388cbe0a078a5c355eb.zip |
Also update escaping for prototype rescues [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5244 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index 322b7e7978..60dc2e8bb4 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -443,7 +443,7 @@ module ActionView if ActionView::Base.debug_rjs source = javascript.dup javascript.replace "try {\n#{source}\n} catch (e) " - javascript << "{ alert('RJS error:\\n\\n' + e.toString()); alert('#{source.gsub(/\r\n|\n|\r/, "\\n").gsub(/["']/) { |m| "\\#{m}" }}'); throw e }" + javascript << "{ alert('RJS error:\\n\\n' + e.toString()); alert('#{source.gsub('\\','\0\0').gsub(/\r\n|\n|\r/, "\\n").gsub(/["']/) { |m| "\\#{m}" }}'); throw e }" end end end |