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

Dataset "name" cannot contain whitespaces #610

Closed
ejdaly opened this issue Jan 15, 2014 · 1 comment
Closed

Dataset "name" cannot contain whitespaces #610

ejdaly opened this issue Jan 15, 2014 · 1 comment

Comments

@ejdaly
Copy link

ejdaly commented Jan 15, 2014

If the dataset.name contains a whitespace, then the class which is applied to it's container div will not be correct.

e.g. If there are two datasets with names "nba teams", "nba players" then the respective divs will have classes:
"tt-dataset-nba teams"
"tt-dataset-nba players"

This will cause issues (for example) if one of the datasets has not results, the headers will still show up.

See:
http://jsfiddle.net/ejdaly/Sud6X/3/

ejdaly added a commit to ejdaly/typeahead.js that referenced this issue Jan 15, 2014
…with class names (Issue twitter#610)

Replaced dataset.name with dataset.name.replace(/\W/g, '') in
typeahead.js
@ejdaly
Copy link
Author

ejdaly commented Jan 15, 2014

Actually, other characters are also likely to cause issues (e.g. comma).
Have added a pull request (#610) to resolve

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

No branches or pull requests

2 participants