Kaz Kylheku <046…@kylheku.com> writes:
> I'm obviously not Microsoft:
Yes, I know this. Microsoft in the days of DOS decided to use
backslashes \ for path seperators. so you need to do
cd \\home\\steve\\local
Microsoft usually tries to break other peoples stuff; in this case UNiX
and mac. It's like the end of line character.
> This is the TXR Lisp interactive listener of TXR 302.
> Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
> 1> (put-json #("foo" "/bar"))
> ["foo","/bar"]t
> 2> (put-json #("foo" "</bar"))
> ["foo","</bar"]t
> 3> (put-json #("foo" "</s"))
> ["foo","</s"]t
> 4> (put-json #("foo" "</sc"))
> ["foo","</sc"]t
> 5> (put-json #("foo" "</scr"))
> ["foo","</scr"]t
> 6> (put-json #("foo" "</scri"))
> ["foo","</scri"]t
> 7> (put-json #("foo" "</scri>"))
> ["foo","</scri>"]t
> 8> (put-json #("foo" "</script>"))
> ["foo","<\/script>"]t
> Yes, escaping every slash, regardless of whether it causes a
> script end tag ambiguity, would annoy users.
> A slash is a path separator; a shit ton of strings that end up in JSON contain
> URLs and paths. To have a backslash on each path separating slash would be
> insane.
Have you tried Microsoft's new editor for JSON? It will work, then break.