-
Notifications
You must be signed in to change notification settings - Fork 444
Fix #6277 Detect unknown unicode in sign message requests and some improvement for misleading message #6300
Conversation
…s that will overflow the textbox, or has unknown uncode. Add the ability for user to display message in ascii-encoding. and pilcrow sign for consecutive newline characters.
Small UI bug when showing 2+ different requests. One with the ASCII warning and one with the pilcrow warning view: I believe the ASCII should only show on one request, and the pilcrow on the other. Seems like the pilcrow warning message isn't being removed |
Should we have a |
We have this for non-ascii, probably a good idea to have a similar toggle for new lines |
need to be careful here so that if the original message actually contains pilcrows, they don't get replaced with newlines |
Yep. We don't need to replace pilcrows back to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you for the quick fix @nuo-xu
Summary of Changes
We will detect unknown unicode in sign request message. (any unicode that is no inside [0, 127] would be considered as unknown)
When unknown unicode is detected, a corresponding warning will show up with a cta button that users can switch between original message and message in ascii-encoding.
We will also detect consecutive newline characters (2 or more consecutive newline characters).
If those consecutive newline characters will push textview content size overflowing the textview frame size, another warning will show up and the message consecutive newline characters will be replaced with pilcrow sign with a number right after indicates how many newline characters are detected.
When message contains both unknown characters and consecutive newline characters that will make message overflow the textbox, two warnings will show up.
Note: the CTA button that to show message unknown unicodes will escape the pilcrow sign.
This pull request fixes #6277
Submitter Checklist:
NSLocalizableString()
Test Plan:
Screenshots:
Simulator.Screen.Recording.-.iPhone.SE.2nd.generation.-.2022-11-01.at.11.21.55.mp4
Reviewer Checklist:
QA/(Yes|No)
bug
/enhancement