Jonathan Lahijani Posted March 18, 2019 Share Posted March 18, 2019 From time to time, I copy/paste snippets of code in the forum here to my editor (SublimeText). Unfortunately, I think the forum software sometimes throws in invalid, INVISIBLE unicode characters that break the copied code and usually will throw PHP errors that at first sight don't make any sense. These characters are impossible to detect in SublimeText, but with the following plugin I just discovered, it will identify them: https://packagecontrol.io/packages/Gremlins 6 Link to comment Share on other sites More sharing options...
szabesz Posted March 18, 2019 Share Posted March 18, 2019 (edited) My strategy is to get rid of those characters right off the bat, instead of detecting them. Here is a previous post of mine: https://processwire.com/talk/topic/20865-permissions-for-page-reference-field-linked-to-users/?do=findComment&comment=180797 By having a system wide tool, one can even use it anywhere not just in a favorite editor. I also use little tools like turning strings into "url friendly string", "lowercase/UPPERCASE/CamelCase". BTW, the new forum update is very aggressively turns forum ULRs into those big preview boxes. Previous version transformed the link right after pasting it in but not later on. This new forum versions keeps converting the links – on seemingly random occasions – even after I have opted for the "plain text" version . Very annoying. Edited March 18, 2019 by szabesz typo 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 5, 2019 Share Posted April 5, 2019 Kind of related and at least interesting. https://medium.com/@umpox/be-careful-what-you-copy-invisibly-inserting-usernames-into-text-with-zero-width-characters-18b4e6f17b66 https://medium.com/@aidobreen/hidden-text-fingerprints-and-how-to-avoid-them-d0103edd2ce4 2 Link to comment Share on other sites More sharing options...
Jonathan Lahijani Posted June 17, 2019 Author Share Posted June 17, 2019 VSCode plugin:https://marketplace.visualstudio.com/items?itemName=nhoizey.gremlins 1 Link to comment Share on other sites More sharing options...
pwired Posted June 18, 2019 Share Posted June 18, 2019 Quote BTW, the new forum update is very aggressively turns forum ULRs into those big preview boxes . . . . Agreed. Seems that the over-engineering is now spreading from processwire into the forum. Link to comment Share on other sites More sharing options...
Recommended Posts