Prevent Select2 from sanitizing markup in backend?

More
6 years 1 month ago #74760 by Dave LeDev
Is there any way of preventing Select2 from sanitizing markup? It's converting my arrow brackets (< >) to &lt; and &gt;, breaking how it would otherwise display. I would prefer not to have to generate hundreds of images of solid colors and instead let CSS handle it.

Current Result:

Desired Result:

(ignoring broken CSS as I haven't gotten that far to fix it; works fine when the menu is opened)

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #74769 by ggppdk
Hello

we have a colorpicker field that needs to be patched to support mult-value

i can patch it  / finish its code and add it to our main distribution package
but it will not have a specific list of values

in your case you need a multi-value select ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #74770 by ggppdk
Hello

i see the Joomla --form element-- color
also support a predefined list of colors, just it does not add a name for them

but we can use our own custom layout and add color names too

so we can also have option for predefined list of colors


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #74773 by Dave LeDev
Correct; I need a multi-value select. I'm hopeful to have names with colors as some users want to be able to search colors by their name. Where auto-complete doesn't work, I can always have it sorted alphabetically.

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #74778 by ggppdk
Hello

Also if you disable the usage of 'select2' JS inside field configuration

then you will see that the conversion to HTML special character classes is made by the field code itself
it is not made by the JS gallery

The conversion is done because:
No, you can't have HTML tags inside the OPTION tags of the SELECT
Code:
<option>Here must be plain HTML</span>
Now if using select2 ,
then it is possible to use its initialization to add such HTML for the purpose of displaying, but we will be replacing select2.js with choices.js so i am reluctant to add something that later may not be supported


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #74834 by Dave LeDev
I'll wait to see what results choices.js yields and come back. :)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.353 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline