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

Impossible to disable escaping of select option labels #8

Open
weierophinney opened this issue Dec 31, 2019 · 2 comments
Open

Impossible to disable escaping of select option labels #8

weierophinney opened this issue Dec 31, 2019 · 2 comments

Comments

@weierophinney
Copy link
Member

At this point it seems to be impossible to disable HTML escaping of select option labels. Here is an entry point into the code for the current HEAD in the master branch. There's no difference to the develop branch at this point.

Why is the possibility to disable HTML escaping important, you might ask? It has become quiet common to use unicode emojis and other non alphanumerical characters in the web. This counts also for select option labels. Theoretically it's possible to include these characters directly into the labels without using entities but the problem is that this is often impractical.

In my case I have a dynamic set of FontAwesome icons that I want to include in my option labels. I can assign the FontAwesome font via CSS to the select element and then include the unicode characters in the label, e.g. . Using the FontAwesome font this becomes a retweet icon.

But it would be so much easier just to be able to use the unicode entities as in this post on StackOverflow (link to solution).

Any pros and cons are welcome!


Originally posted by @netbrothers-tr at zendframework/zend-form#183

@DamianArbuz
Copy link

any updates?

@froschdesign
Copy link
Member

@DamianArbuz
The problem here is not laminas-form or some HTML escaping, because it does not work in some browsers or OS. (For example: https://bugzilla.mozilla.org/show_bug.cgi?id=1345793 or FortAwesome/Font-Awesome#996)

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