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

Escaping/unescaping of option text is incorrect #13

Closed
adamalton opened this issue May 7, 2010 · 3 comments
Closed

Escaping/unescaping of option text is incorrect #13

adamalton opened this issue May 7, 2010 · 3 comments

Comments

@adamalton
Copy link

If an contains some correctly escaped html entities like:

Pie > Bread

Then in the Stylish select, the entities are no longer escaped, and you get:
Pie > Bread.
Which is incorrect. The entities should still be escaped.

Suppose you had:
Choose your tag
<li> <p>

This completely breaks the rendering of the stylish select.

The fix is really easy: just replace the 3 occurrances of .text(); in the code with .html();
If I knew how to use Git, or I wasn't in the middle of something else then I'd make this change and check it in. NB: The occurrances of .text(some_var_here); do not need to be replaced.

@adamalton
Copy link
Author

Aaarggh, github has completely ruined my post by not escaping things properly. How ironic!

Anyway, my fix is here:
http://pastebin.com/j2ZNjdQ4

@scottdarby
Copy link
Owner

source has been updated with this fix

@cjunge
Copy link

cjunge commented Sep 6, 2010

I found this issue still in the latest version of the source available on this site. Looks like the option text is retrieved as HTML but still set as text.

See this issue: http://github.com/sko77sun/Stylish-Select/issues#issue/15

This issue was closed.
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