+++ This bug was initially created as a clone of Bug #1325896 +++ We need to implement PPB_KeyboardInputEvent_Create for "backspace" and "escape". We found that "ESC" would be passing into rpc as |\u 4 hexadecimal digits| in json. Currently, our rpc only recognize |\u0000| but the rest of characters that use this format. We would need to support this format at least for "ESC".
Component: General → Plug-ins
Product: Firefox → Core
Created attachment 8830596 [details] [diff] [review] Support json unicode character escape sequence for ESC Hey Peter, Could you help with this patch? This patch is a quick fix for "Esc" which only handles unicode character escape sequence for "ESC". However, we probably need to do some studies to know if we need to fully support |\u 4 hexadecimal digits| json format. Thank you very much.
So, Ecmascript specifies that stringify outputs \uxxxx for characters with a "value less than the space character", so 0000 to 001F. You could check for |*(next + 1) == '0'| and |*(next + 2) == '0'| and then convert using strtol for example.
Created attachment 8837959 [details] [diff] [review] Handle Control characters code units from U+0000 to U+001F in rpc.h Hey peter, This patch supports escape sequence from U+0000 to U+001F in rpc.h when we parse JSON to string. Could you take a look at it? thanks
Attachment #8837959 - Flags: review?(peterv) → review+
Created attachment 8844292 [details] [diff] [review] 0001-Bug-1331298-Handle-Control-characters-code-units-fro.patch Result of try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6f9cb3f4f8ff9ee908e8c29ba0c220ad306b0df8
Attachment #8837959 - Attachment is obsolete: true
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/dc335045a33b Handle Control characters code units from U+0000 to U+001F in rpc.h. r=peterv
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.