-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Description
Build environment: macOS
XS 16.9.1, slot 32 bytes, ID 4 bytes from jsvu
Description
escape() seems broken and does not properly escape chars
> ~/.jsvu/bin/xs -e "print(escape(String.fromCodePoint(0x80)))"
�
> ~/.jsvu/bin/xs -e "print(escape(String.fromCodePoint(0x81)))"
�
> ~/.jsvu/bin/xs -e "print(escape(String.fromCodePoint(0x80, 0x81)))"
%80%81
> ~/.jsvu/bin/xs -e "print(escape(String.fromCodePoint(0x7F)))"
%7F
> ~/.jsvu/bin/xs -e "print(escape(String.fromCodePoint(0x80, 0x42)))"
�B0x80 and 0x81 should be always escaped, instead, the behavior depends on surrounding chars
It's in additional browser features, but if it's present it should be implemented correctly
Otherwise, feature-detecting libraries could misbehave (while e.g. not implementing this function at all would have been valid)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels