mobile
mobile copied to clipboard
Android: App loses data if note contains a null character
My Android phone's physical keyboard app has a quirk where, in some text areas, typing any alt character (numbers, punctuation) at the start of a new line inserts a null character (code 0x00) instead. These aren't rendered visually, and TBH before Standard Notes started discarding the contents of my notes, before I understood what was happening, I thought it was just a tolerable nuisance that I had to type alt characters twice to start a line. I figured it out when I tried Quill Notes, and it rendered null characters as question mark boxes.
Expected:
Standard Notes saves everything I enter into a note. (It would be okay if null characters were stripped out.)
Actual:
Standard Notes discards any text appearing after a null (0x00) character in the note body.
Steps to reproduce:
- Create a new note.
- Enter some text.
- Enter a null character (0x00), maybe with a connected USB or Bluetooth keyboard, or via the clipboard. It won't render anything; the cursor won't advance.
- Enter some more text.
- Tap the arrow at the top left to return to the notes list.
- Tap the new note to reopen it.
- Observe that all text after the null character was lost.
I couldn't figure out what component powers the note editor, but maybe this issue is related to this 2-year-old React Native bug?
Hi @mildmojo, thank you for reporting this issue to us. I'll forward it over to the dev team to see if someone can look into it further and reproduce it consistently.
I was able to reproduce this using a unicode pad on my Android. The content after the null character was not visible on the Android, but opening the note in web browser shows the null character as the weird box, and content after. I cannot manually insert the null character in Firefox on Ubuntu (using ctrl+shift+u) as the browsers seems to prevent it.
EDIT: tried re-opening notes in the other editors, this appears exclusive to the plain editor. Tried all four MD editors, bold, plus, and code.