pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/select2/select2/pull/6311

m/assets/global-52276e82f63bb403.css" /> Allow html content in selection template by 5andr0 · Pull Request #6311 · select2/select2 · GitHub
Skip to content

Allow html content in selection template#6311

Open
5andr0 wants to merge 1 commit intoselect2:developfrom
5andr0:template-fix
Open

Allow html content in selection template#6311
5andr0 wants to merge 1 commit intoselect2:developfrom
5andr0:template-fix

Conversation

@5andr0
Copy link

@5andr0 5andr0 commented May 9, 2024

Applying the same logic, which was already implemented for the result template, where only strings are HTML escaped. Now the user does not have to overwrite escapeMarkup when passing html content from templateSelection. Also fixed the typecheck of strings, because typeof new String("") is 'object' and not 'string'.

This pull request includes a

  • Bug fix
  • New feature
  • Translation

The following changes were made

  • Fixing a bug, where String objects are not escaped because typeof new String("") is 'object', not 'string'
  • Only escape template strings for selection aswell

Applying the same logic, which was already implemented for the result template, where only strings are HTML escaped.
Now the user does not have to overwrite escapeMarkup when passing html content from templateSelection.
Also fixed the typecheck of strings, because typeof String is Object and not string.
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

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy