Index: base/json/string_escape.cc |
diff --git a/base/json/string_escape.cc b/base/json/string_escape.cc |
index 469f9f98c038e1ec027fcf23203289ea4c67af88..f5d6a760218377384e4412fea2f2ab89fc6b5424 100644 |
--- a/base/json/string_escape.cc |
+++ b/base/json/string_escape.cc |
@@ -59,6 +59,14 @@ bool EscapeSpecialCodePoint(uint32 code_point, std::string* dest) { |
case '<': |
dest->append("\\u003C"); |
break; |
+ // Escape the "Line Separator" and "Paragraph Separator" characters, since |
+ // they should be treated like a new line \r or \n. |
+ case 0x2028: |
+ dest->append("\\u2028"); |
+ break; |
+ case 0x2029: |
+ dest->append("\\u2029"); |
+ break; |
default: |
return false; |
} |