Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip special characters from hashtags #3

Open
dartar opened this issue Aug 4, 2014 · 3 comments
Open

Strip special characters from hashtags #3

dartar opened this issue Aug 4, 2014 · 3 comments

Comments

@dartar
Copy link
Collaborator

dartar commented Aug 4, 2014

Special characters break hashtags:
https://twitter.com/wpstubs/status/496166123277012992

We might replace characters like "&" that we can't strip without altering the meaning of the hashtag, see https://twitter.com/wpstubs/status/496151412510695424

@phuedx
Copy link
Contributor

phuedx commented Aug 7, 2014

It might actually be worthwhile using Twitter's official JavaScript text processing library (twitter/twitter-text-js) here.

@theopolisme
Copy link
Owner

I'm not sure that library is really all that useful here (it is intended for parsing tweets, not creating them, although certainly some of their regexps might be helpful...).

Until we come up with a better/fancier solution, for now I think stripping all non-alphanumeric characters (plus underscores) is a safe and easy way to handle this.

Open to suggestions though.

theopolisme added a commit that referenced this issue Aug 8, 2014
@dartar
Copy link
Collaborator Author

dartar commented Aug 9, 2014

We also have issues with special characters in links, see https://twitter.com/wpstubs/status/497984790360899585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants