Message239189
According to that RFC section, the forward solidus is allowed to be in an escape sequence, but it is also allowed unescaped:
“All Unicode characters may be placed within the quotation marks, except for the characters that must be escaped: quotation mark, reverse solidus, and the control characters (U+0000 through U+001F).”
. . .
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
In general, escaping the forward solidus is not needed, and is easier to read. Apparently this escaping is a workaround for embedding JSON inside a HTML <script> element, where the sequence “</” is not allowed, and HTML itself does not allow escaping: <http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2>. In that case, JSON like {markup: "<i>italic<\/i>"} would be escaped, but most cases still do not need escaping, such as {url: "http://example.net/"}. |
|
Date |
User |
Action |
Args |
2015-03-24 22:12:03 | martin.panter | set | recipients:
+ martin.panter, ezio.melotti, xaka |
2015-03-24 22:12:03 | martin.panter | set | messageid: <1427235123.02.0.212902642011.issue23766@psf.upfronthosting.co.za> |
2015-03-24 22:12:03 | martin.panter | link | issue23766 messages |
2015-03-24 22:12:02 | martin.panter | create | |
|