Skip to content
This repository
Browse code

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

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 7b453d28449527aeac18395c471e3010a15fbb31 1 parent 4d5b913
Jeremy Kemper jeremy authored
2  activesupport/CHANGELOG
... ... @@ -1,5 +1,7 @@
1 1 *SVN*
2 2
  3 +* Fix unicode JSON regexp for Onigurama compatibility. #6494 [whitley]
  4 +
3 5 * update XmlSimple to 1.0.10. Closes #6532. [nicksieger]
4 6
5 7 * 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]
2  activesupport/lib/active_support/json/encoders/core.rb
@@ -32,7 +32,7 @@ module Encoders #:nodoc:
32 32 ESCAPED_CHARS[s]
33 33 }.gsub(/([\xC0-\xDF][\x80-\xBF]|
34 34 [\xE0-\xEF][\x80-\xBF]{2}|
35   - [\xF0-\xF7][\x80-\xBF]{3})+/ux) { |s|
  35 + [\xF0-\xF7][\x80-\xBF]{3})+/nx) { |s|
36 36 s.unpack("U*").pack("n*").unpack("H*")[0].gsub(/.{4}/, '\\\\u\&')
37 37 } + '"'
38 38 end

0 comments on commit 7b453d2

Please sign in to comment.
Something went wrong with that request. Please try again.