Open xlash opened 3 years ago
Could you provide the exact steps to get the NULL byte into the note?
Just copied and pasted from a PDF.
Attempt to copy this ==> (htt ps://github.com/laurent22/joplin)
Try copying the links
Unsure the NULL bytes are still preserve after upload to github and download :-S
Thanks for sharing the PDF file. There's something funny about the links in that particular file, as if they've been modified so that they can't be clicked (even from the PDF itself). But it's interesting anyway and that kind of data could be the reason for weird sync failures that I've never managed to replicate. I'll look into it and see how to filter these invalid bytes.
A few more details :
PDF was generated from https://github.com/remarkjs/remark then https://github.com/astefanutti/decktape
My MacOS Preview application for pdf is the only one so far copying the NULL byte. Chrome browser or Ubuntu Document Viewer does not .
Btw looks like 0x00 has special meaning at least in commonmark
For security reasons, the Unicode character U+0000 must be replaced with the REPLACEMENT CHARACTER (U+FFFD).
Thanks for checking Roman. I would have just stripped it off but I guess we can follow their recommendation then.
I couldn't replicate this by copying and pasting the PDF. @xlash any chance you could export your note that was causing problem as JEX and upload it here? If it's a JEX all data should be preserved including NULL bytes and that should make it possible to replicate the problem.
I copied some notes from a pdf, which replaced https with h<0x00>ps. This null value was saved on the MacOS Client, and my android client was not able to synchronise the notes.
Environment
Joplin version: Revision: f560563 (master) Platform: MacOS OS specifics:
Android 1.8.5
Steps to reproduce