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

Changeset 5432

Show
Ignore:
Timestamp:
11/05/06 19:03:37 (2 years ago)
Author:
bitsweat
Message:

Fix unicode JSON regexp for Onigurama compatibility. Closes #6494.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/CHANGELOG

    r5414 r5432  
    11*SVN* 
     2 
     3* Fix unicode JSON regexp for Onigurama compatibility.  #6494 [whitley] 
    24 
    35* update XmlSimple to 1.0.10. Closes #6532. [nicksieger] 
  • trunk/activesupport/lib/active_support/json/encoders/core.rb

    r4787 r5432  
    3333        }.gsub(/([\xC0-\xDF][\x80-\xBF]| 
    3434                 [\xE0-\xEF][\x80-\xBF]{2}| 
    35                  [\xF0-\xF7][\x80-\xBF]{3})+/ux) { |s| 
     35                 [\xF0-\xF7][\x80-\xBF]{3})+/nx) { |s| 
    3636          s.unpack("U*").pack("n*").unpack("H*")[0].gsub(/.{4}/, '\\\\u\&') 
    3737        } + '"'