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

Unable to use triangle brackets in data-placeholder text #2314

Closed
fedulovivan opened this issue Apr 21, 2015 · 2 comments · Fixed by #2712
Closed

Unable to use triangle brackets in data-placeholder text #2314

fedulovivan opened this issue Apr 21, 2015 · 2 comments · Fixed by #2712

Comments

@fedulovivan
Copy link

initializing chosen with following markup

<select data-placeholder="&lt;None&gt;">
<option></option>
<option value=1>Value 1</option>
</select>

leads to empty widget instead of displaying text '<None>' it it
empty widget

this reproduces after upgrading to version 1.4.2 from 1.3.0

@fedulovivan
Copy link
Author

Any comments?

@avinash2
Copy link

I'm having a similar issue when the options contain angular brackets or even the HTML entities for them. For example:

<option>Mr. Smith &lt; [email protected]&gt;</option>

will only get submitted as:

Mr. Smith 

The whole text wrapped with "<" & ">" or "<" and ">" gets swallowed somehow. Also, when the options contain "<" & ">" instead of entities, the values wrapped between "<" and ">" aren't even displayed on the front end.

Please help! (Using Chosen ver. 1.4.2)

Thanks!

koenpunt added a commit to koenpunt/chosen that referenced this issue Oct 1, 2016
koenpunt added a commit to koenpunt/chosen that referenced this issue Oct 1, 2016
koenpunt added a commit to koenpunt/chosen that referenced this issue Oct 11, 2016
koenpunt added a commit to koenpunt/chosen that referenced this issue Oct 11, 2016
koenpunt added a commit that referenced this issue Oct 11, 2016
koenpunt added a commit to koenpunt/chosen that referenced this issue Oct 11, 2016
koenpunt added a commit that referenced this issue Oct 11, 2016
* add data-placeholder specs

* escape default text

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

Successfully merging a pull request may close this issue.

3 participants