-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Sanitize HTML in subtext and title instead of stripping it away #2247
Comments
See #1889 and https://stackoverflow.com/questions/48913405/bootstrap-selectpicker-data-subtext-disappears/49030441#49030441. Other than not being as elegant, is there a reason |
Hi; thanks for the information! The original message was kinda written in a hurry btw so I forgot to also thank you for the great component! 👍 It is clear that We did this by setting (*) Let's not discuss the rationale behind such design; I know we can have separate fields outside the button. |
I saw there are plans for the |
I have the same problem, can't set with html icons since 1.13.6. A breaking change in a minor release :( It would be great if you could provide a way of allowing html back in the title tag! |
Problem also mentioned in: |
@caseyjhol Thanks for pointing out the issue. That provides a working alternative for our use case to specify selected item's content instead of using title (I see you had concerns about conflicting with select's own title). If implemented, this issue and related ones can be closed. |
The sanitizer implemented in 1.13.6 (#2199) sanitizes the data-content, but not data-subtext and title.
However, there are valid use cases one might want to use html in subtext and in the title (in our use case to show detailed information in the button for the selected item).
Therefore I think the component should sanitize these attributes instead of just stripping HTML out. This is more consistent with data-content sanitizing and would also resolve #2225 gracefully.
The text was updated successfully, but these errors were encountered: