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

node.nodeValue.replace(/</g, '&lt;') #6

Open
kovchiy opened this issue Jun 22, 2014 · 0 comments
Open

node.nodeValue.replace(/</g, '&lt;') #6

kovchiy opened this issue Jun 22, 2014 · 0 comments

Comments

@kovchiy
Copy link

kovchiy commented Jun 22, 2014

Line val = node.nodeValue should be changed to val = node.nodeValue.replace(/</g, '&lt;') – strange bug when $('<a>foo &lt;</a>')[0].textContent outputs foo <. So if text node had escaped HTML, it will be unescaped

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

1 participant