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

Render markup in selector options text (fixes #51, fixes #50) #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tmslnz
Copy link

@tmslnz tmslnz commented Aug 24, 2015

This change allows Selectize to correctly render any markup found in the text value of the options.

The text property of the Selectize options is passed through htmlDecode(). This function attempts to decode any encoded HTML, otherwise returning original string unchanged.

All Selectize options in the are also updated with a search property. This is assigned just the .text() value from the text property (after unescaping if needed), so that typing div or img in the search field won't match any markup that may have been present.

This change allows Selectize to correctly render any markup found in the `text` value of the options.

The `text` property of the Selectize options is passed through `htmlDecode()`. This function attempts to decode any encoded HTML, otherwise returning original string unchanged.

All Selectize `options` in the are also updated with a `search` property. This is assigned just the `.text()` value from the `text` property (after unescaping if needed), so that typing `div` or `img` in the search field won't match any markup that may have been present.
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

Successfully merging this pull request may close these issues.

1 participant