-
-
Notifications
You must be signed in to change notification settings - Fork 728
Open
Labels
medium severityUsed to report medium severity bugs (e.g. Malfunctioning Features but still useable)Used to report medium severity bugs (e.g. Malfunctioning Features but still useable)
Description
Contact Details
No response
What happened?
Redbean's EncodeJson built-in has documented assumptions about strings: "We assume strings in value contain UTF-8. This serializer currently does not produce UTF-8 output. The output format is right now ASCII."
Forward slashes and equal signs are ASCII and will not be escaped in common JSON serializers. However, Redbean escapes them:
: print(EncodeJson('/'))
"\/"
: print(EncodeJson('='))
"\u003d"
This is unwarranted in line of the JSON spec https://www.json.org/json-en.html.
I expect the Redbean JSON encoder to only escape when the spec demands it.
Version
redbean 3.0.0
What operating system are you seeing the problem on?
Linux
Relevant log output
Metadata
Metadata
Assignees
Labels
medium severityUsed to report medium severity bugs (e.g. Malfunctioning Features but still useable)Used to report medium severity bugs (e.g. Malfunctioning Features but still useable)