Skip to content

Changed .html() to .text() #228

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

Merged
merged 1 commit into from
Feb 25, 2015
Merged

Changed .html() to .text() #228

merged 1 commit into from
Feb 25, 2015

Conversation

gblock0
Copy link

@gblock0 gblock0 commented Sep 13, 2014

The string passed to the menu items is eventually "eval"ed by jQuery, so using .html() allows XSS to get through and get executed by the browser.

…e jQuery calls eval on the html passed through. Changed .html() to .text()
@rodneyrehm
Copy link
Contributor

good catch!

@jzelenkov jzelenkov added the Bug label Feb 24, 2015
@jzelenkov jzelenkov added this to the v2 milestone Feb 24, 2015
@jzelenkov jzelenkov merged commit f3137f2 into swisnl:master Feb 25, 2015
jzelenkov added a commit that referenced this pull request Feb 25, 2015
@awick
Copy link

awick commented Mar 12, 2015

So I was using this "feature" to do things like foo <b>and not</b> bar. Is there a way to still do this? Could a new type be added ( maybe "htmled" since html is already used) that has the old behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants