aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/dependencies_test_helpers.rb
diff options
context:
space:
mode:
authorMario Caropreso <mario.caropreso@gmail.com>2013-05-09 13:41:56 +0100
committerMario Caropreso <mario.caropreso@gmail.com>2013-05-09 13:41:56 +0100
commit582b44175b627e3578fe71e1d452c429022da636 (patch)
tree427affdfc7b0836eef4c5b5bc175f8dbfad2c967 /activesupport/test/dependencies_test_helpers.rb
parentcecef59fa2f670bbd5b61fcaf54bceae2c4628b0 (diff)
downloadrails-582b44175b627e3578fe71e1d452c429022da636.tar.gz
rails-582b44175b627e3578fe71e1d452c429022da636.tar.bz2
rails-582b44175b627e3578fe71e1d452c429022da636.zip
Added escaping of U+2028 and U+2029 inside the json encoder.
U+2028 and U+2029 are allowed inside strings in JSON (as all literal Unicode characters) but JavaScript defines them as newline seperators. Because no literal newlines are allowed in a string, this causes a ParseError in the browser. We work around this issue by replacing them with the escaped version. The resulting JSON is still valid and can be parsed in the browser. This commit has been coauthored with Viktor Kelemen @yikulju
Diffstat (limited to 'activesupport/test/dependencies_test_helpers.rb')
0 files changed, 0 insertions, 0 deletions