Skip to content

JSONObject::quote(). Why special case for "</" but not "/" #26

@budric

Description

@budric

Hi,
I'm having trouble understanding this code:
case '/':
if (b == '<') {
sb.append('');
}
sb.append(c);
break;

Why is escape character '' only appended when the previous character is <. Looking at JSON control characters, the '/' is always a control character and should be prefixed with . Yet the code doesn't do that.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions