Created
February 21, 2018 16:14
-
-
Save hachesilva/87cbd2b499e08d66a6acac16bc17d373 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var content = 'MY TEXT WITH INVISIBLE CHARS'; | |
if (content.search(/[^\u0000-\u007E]/g) >= -1) { | |
content.replace(/[^\u0000-\u007E]/g, ""); | |
this.code.set(content); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This removes visible characters such as emojis.