yarGen icon indicating copy to clipboard operation
yarGen copied to clipboard

Escaping really needed?

Open ruppde opened this issue 3 years ago • 0 comments

is this really needed in yarGen.py? strings with double quotes end up with 5 backslashes when creating new json files with "-g -c", e.g.

             "\\\\\"isexe@": 1,

probably they get escaped a 2nd time by the json-export function?

            # Escape strings
            if len(string) > 0:
                string = string.replace(b'\\', b'\\\\')
                string = string.replace(b'"', b'\\"')

looks to me like it works without these 3 lines (which results in only one backslah before a doublequote) but I'm new to yarGen??

ruppde avatar Jan 27 '23 23:01 ruppde