Skip to content

Problem with invisible characters from Chatterino/7TV #54

Description

@declider

Some third-party tools may insert "invisible" characters into the message you send, and this can sometimes make the message difficult to parse.

For example this:

ComfyJS.onChat = ( user, message, flags, self, extra ) => {
    console.log(message.split(" "))
}

can output this:
example1
or this:
example2

So far I have found this working fix:

message = message.replace("  "," ").replace(/[\uD800-\uDFFF]/gi, []).trim()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions