json_cr_escaping.patch 395 B

123456789101112
  1. Index: common/json.lua
  2. ===================================================================
  3. --- common/json.lua (revision 1131457)
  4. +++ common/json.lua (working copy)
  5. @@ -333,6 +333,7 @@
  6. s = string.gsub(s,'\\','\\\\')
  7. s = string.gsub(s,'"','\\"')
  8. s = string.gsub(s,"'","\\'")
  9. + s = string.gsub(s,'\r','\\r')
  10. s = string.gsub(s,'\n','\\n')
  11. s = string.gsub(s,'\t','\\t')
  12. return s