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

Single Quotes in value #337

Closed
joeykamsteeg opened this issue Jun 23, 2015 · 4 comments
Closed

Single Quotes in value #337

joeykamsteeg opened this issue Jun 23, 2015 · 4 comments

Comments

@joeykamsteeg
Copy link

joeykamsteeg commented Jun 23, 2015

Single quotes using in a value of a option will breaks the javascript execution. When using a single quote inside a option you can't open de select box anymore.

Error:

Uncaught Error: Syntax error, unrecognized expression: li[data-val='kilo's'] jquery.js:1453

jQuery version: 2.1.3

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22809465-single-quotes-in-value?utm_campaign=plugin&utm_content=tracker%2F23157&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F23157&utm_medium=issues&utm_source=github).
@sgengler
Copy link

sgengler commented Aug 4, 2015

+1, this should be fixed, but can use ' in place of single quotes for values for the time being

@lachlantweedie
Copy link

Fixed this by changing line 1525 to this:

var currentElem = self.list.find("li[data-val=\"" + self.dropdownText.attr("data-val") + "\"]"),

@kalleth
Copy link

kalleth commented Sep 27, 2020

Awesome, thanks @lachlantweedie -- necroposting, I know, but your fix worked for me -- #384 seems to include this fix too.

@joeykamsteeg
Copy link
Author

Closed due inactive repository

@joeykamsteeg joeykamsteeg closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2022
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

4 participants