Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ulrischa
57 days ago
|
parent
|
context
|
favorite
| on:
Element: setHTML() method
Since 5 years everybody says Jquery us no longer necessary. But really baisc function like this take a long time for replacing Jquery
halapro
57 days ago
[–]
jQuery does not sanitize HTML. This is why jQuery is no longer necessary, even if people think it is.
ulrischa
57 days ago
|
parent
[–]
There is the jquery bashing again. let sanitizedHTML = $('<div>').text(unsanitizedHTML).html();
wccrawford
57 days ago
|
root
|
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: