(XE6) when i load a string from Json, and its a path like .\\Folder\\FolderB it is loaded as .\Folder\FolderB

(XE6) when i load a string from Json, and its a path like .\\Folder\\FolderB it is loaded as .\Folder\FolderB
But when writing, it is written as .\Folder\FolderB (which is incorrect), too? Didn't find the source where it replaces the double \\ with \ on reading. Where does that happen?

Comments

  1. Year i know. but isnt the escaping usually done by the json library?

    ReplyDelete
  2. Sounds like a bug.

    Another optional escape is for /, which can, but is not always escaped as \/, it is however "good practice" to escape / to guard against XSS in case the JSON ends up in HTML or a JavaScript section.

    ReplyDelete

Post a Comment