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

I have to use slash / in option value #3096

Closed
suatsuphi opened this issue Jul 3, 2020 · 1 comment
Closed

I have to use slash / in option value #3096

suatsuphi opened this issue Jul 3, 2020 · 1 comment

Comments

@suatsuphi
Copy link

suatsuphi commented Jul 3, 2020

Hi,
If I have use slash in url list, seleted value not working

<optgroup label="Categories">
                            <option value="computer-and-accessories">Computer and Accessories</option>
                                <option value="computer-and-accessories/computer">&nbsp;&nbsp;Computer</option>
            <option value="computer-and-accessories/computer/desktop-computer">&nbsp;&nbsp;&nbsp;&nbsp;Desktop Computer</option>
                            <option value="smartphones-tablets">Smartphones &amp; Tablets</option>
                            <option value="tv-video-audio">TV, Video &amp; Audio</option>
                            <option value="cameras-photo-video">Cameras, Photo &amp; Video</option>
                            <option value="headphones">Headphones</option>
                    </optgroup>
@pjfsilva
Copy link

What do you mean by not working?

A very simple example seems to work just fine:
https://jsfiddle.net/mztje7gk/

Chosen seems to work properly with these options and asking for .val() is correct. Your problem is probably on the backend where you are receiving the data. You can try to replace / with the proper encoding &sol;.

This doesn't seem like a chosen bug, please close.

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

3 participants