Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 5244

Show
Ignore:
Timestamp:
10/09/06 00:45:41 (2 years ago)
Author:
david
Message:

Also update escaping for prototype rescues [DHH]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_view/helpers/prototype_helper.rb

    r5095 r5244  
    444444                source = javascript.dup 
    445445                javascript.replace "try {\n#{source}\n} catch (e) " 
    446                 javascript << "{ alert('RJS error:\\n\\n' + e.toString()); alert('#{source.gsub(/\r\n|\n|\r/, "\\n").gsub(/["']/) { |m| "\\#{m}" }}'); throw e }" 
     446                javascript << "{ alert('RJS error:\\n\\n' + e.toString()); alert('#{source.gsub('\\','\0\0').gsub(/\r\n|\n|\r/, "\\n").gsub(/["']/) { |m| "\\#{m}" }}'); throw e }" 
    447447              end 
    448448            end