get rid of character from jsfiddle

柔情痞子 提交于 2019-12-22 08:55:43

问题


jsFiddle seems to put a character in the fiddles that is invisible and causes erros when javascript is copy/pasted into another editor and run. I know the easy answer is simply not to copy/paste from that site. But supposing it's been done, and you must locate the character in your document: is there any tool online which can be used show invisible characters, and assist in their removal?


回答1:


The invisible character added by jsFiddle is U+200B (dec 8203) and called a "ZERO WIDTH SPACE". You can remove it by .replace('\u200b','')

Ironically, here is a fiddle for it.



来源:https://stackoverflow.com/questions/13463458/get-rid-of-character-from-jsfiddle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!