sickmartian / quick_simplenote

Sublime Text 2 plugin for Simplenote
MIT License
11 stars 7 forks source link

Unwanted conversion of html entities in md notes #27

Open RandyVogel opened 6 years ago

RandyVogel commented 6 years ago

It seems to me as if QuickSimpleNote is changing some special characters into their html entities such as: "&" ampersand gets changed into "&" ">" greater than gets changed into ">" "<" less than gets changed into "<"

might be more, but those are three that I use and see getting changed frequently. The annoying thing is that the change happens inconsistently.

It never happens with notes that I use solely with the SimpleNote web app or the SimpleNote android app.

It frequently happens when I open a note in ST3 via QuickSimpleNote after having edited that note in the android app. When this entity replacement happens, if I look at the note via the SimpleNote android or web client, I can see that the characters have not been replaced there (which is why I think this plug-in is causing the trouble).

And if I go back and forth between the two, the ampersand will be multiply replaced, eg: & -> & -> &amp; -> &amp;amp; etc.

How can I stop this from happening?

RandyVogel commented 6 years ago

Looking at things a little more, in my current problematic sample file, the characters that are getting mis-converted are all html-like things present in the raw md file that adjacent to other non-alpha chars. Eg: the html entity "&#9784;" gets changed into "&amp;#9784;" or "<(wip)>" gets changed into "&lt;(wip)&gt;" or "{{tag>music" gets changed into "{{tag&gt;music"

sickmartian commented 6 years ago

Thanks for the report, I just noticed this myself as well on a note I use quite often... but it never happened before today for me and I've been unable to trigger it now.. have you been experiencing this for a while?

sickmartian commented 6 years ago

Also, when you say markdown, you mean you are using the note_syntax setting? if so, with which value? Or are you using the title_extension_map to map a title to the "md" extension?

sickmartian commented 6 years ago

Nevermind, was able to replicate it with the web client as well... gonna take a look hopefully over the weekend.

sickmartian commented 6 years ago

Seems to be related to a quite old bug which the API library we use worked around here https://github.com/mrtazz/simplenote.py/commit/0c37fb413d26fda1f7c35c25c1195e6950dcbb27

The newest version of the library is working fine for me right now, although I would like to take some time testing it, as a workaround if you know where the plugin lives you can try to replace the content of the file simplenote.py with the ones here https://raw.githubusercontent.com/mrtazz/simplenote.py/master/simplenote/simplenote.py (or let me know your ST version and OS and maybe I can help)

RandyVogel commented 6 years ago

replaced simplenote.py

back-and-forth edits swapping between the simplenote web client, simplenote android app, and sublime text 3 with quick simplenote seems to show that the problem has been resolved, thanks!

On Thu, Oct 11, 2018 at 6:02 PM sickmartian notifications@github.com wrote:

Seems to be related to a quite old bug which the API library we use worked around here mrtazz/simplenote.py@0c37fb4 https://github.com/mrtazz/simplenote.py/commit/0c37fb413d26fda1f7c35c25c1195e6950dcbb27

The newest version of the library is working fine for me right now, although I would like to take some time testing it, as a workaround if you know where the plugin lives you can try to replace the content of the file simplenote.py with the ones here https://raw.githubusercontent.com/mrtazz/simplenote.py/master/simplenote/simplenote.py

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sickmartian/quick_simplenote/issues/27#issuecomment-429169898, or mute the thread https://github.com/notifications/unsubscribe-auth/ALT8M7evLja14kpuhIzRc4MvW_Lw9NOQks5uj-oxgaJpZM4XWTP2 .