Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
halapro
77 days ago
|
parent
|
context
|
favorite
| on:
Element: setHTML() method
jQuery does not sanitize HTML. This is why jQuery is no longer necessary, even if people think it is.
ulrischa
77 days ago
[–]
There is the jquery bashing again. let sanitizedHTML = $('<div>').text(unsanitizedHTML).html();
wccrawford
77 days ago
|
parent
[–]
You can 100% do that same thing without jQuery. It's not even complicated.
And that is
not
what the new .setHTML() does.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: