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

Bug : space char in option value leads to crash #4

Closed
badulesia opened this issue Mar 28, 2017 · 4 comments
Closed

Bug : space char in option value leads to crash #4

badulesia opened this issue Mar 28, 2017 · 4 comments

Comments

@badulesia
Copy link

badulesia commented Mar 28, 2017

Hello
This works
<option value="twowords">Two words</option>
That doesn't
<option value="two words">Two words</option>

Conclusion : an option value with a space char causes the script to fail.
In the code generated by the plugin, I can see data-value=two words, that of course cause the script to crash as there is no quote embedding "two words". Coders may want to use an option value with a space char inside.
I have also a script with option values such as <= or >= that crashes for the same reason, no quote embedding, so <= that is regarded as a test instead of a just a string.
I have quickly browse the code and the error maybe line 372 in the ternary test. But you know your code better of course :)

@thdoan
Copy link
Owner

thdoan commented Mar 29, 2017

Thanks for reporting this. I will fix this in the same release as your feature request :)

@badulesia
Copy link
Author

badulesia commented Mar 29, 2017 via email

@thdoan
Copy link
Owner

thdoan commented Mar 29, 2017

I was using Bootstrap-select before, but the most recent project didn't use Bootstrap and I couldn't find anything simple and lightweight that fit all my needs, so had to roll my own.

thdoan pushed a commit that referenced this issue Mar 31, 2017
@thdoan
Copy link
Owner

thdoan commented Mar 31, 2017

The fix will be in v4.9.0.

@thdoan thdoan closed this as completed Mar 31, 2017
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

2 participants