Permalink
Browse files

Merge [5432] from trunk.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 4aa358d commit 320875ad776e044f36ba25f6e4de346966401dcc @jeremy jeremy committed Nov 5, 2006
Showing with 3 additions and 1 deletion.
  1. +2 −0 activesupport/CHANGELOG
  2. +1 −1 activesupport/lib/active_support/json/encoders/core.rb
View
2 activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fix unicode JSON regexp for Onigurama compatibility. #6494 [whitley]
+
* update XmlSimple to 1.0.10. Closes #6532. [nicksieger]
* Update dependencies to allow constants to be defined alongside their siblings. A common case for this is AR model classes with STI; user.rb might define User, Administrator and Guest for example. [Nicholas Seckar]
View
2 activesupport/lib/active_support/json/encoders/core.rb
@@ -32,7 +32,7 @@ module Encoders #:nodoc:
ESCAPED_CHARS[s]
}.gsub(/([\xC0-\xDF][\x80-\xBF]|
[\xE0-\xEF][\x80-\xBF]{2}|
- [\xF0-\xF7][\x80-\xBF]{3})+/ux) { |s|
+ [\xF0-\xF7][\x80-\xBF]{3})+/nx) { |s|
s.unpack("U*").pack("n*").unpack("H*")[0].gsub(/.{4}/, '\\\\u\&')
} + '"'
end

0 comments on commit 320875a

Please sign in to comment.