mirror of
https://github.com/github/rails.git
synced 2026-01-30 16:58:15 -05:00
Also update escaping for prototype rescues [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5244 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user