aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
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/CHANGELOG.md
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/CHANGELOG.md')
-rw-r--r--activesupport/CHANGELOG.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 2e04b17e78..27d4d54afa 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,9 @@
+* Added escaping of U+2028 and U+2029 inside the json encoder.
+ These characters are legal in JSON but break the Javascript interpreter.
+ After escaping them, the JSON is still legal and can be parsed by Javascript.
+
+ *Mario Caropreso*
+
* Fix skipping object callbacks using metadata fetched via callback chain
inspection methods (`_*_callbacks`)