Reputation: 201
I have a react application that builds an Editor component dynamically. One of the fields in this editor is a content editable div that gets from API -json response- a content to be displayed in that div with some of the text highlighted or styled with any other html tags inside.
The user can change this content and I keep sending it back to API and getting it back from API to be displayed accordingly.
But I'm concerned about security, is this a risky vulnerability? How should I act in such a case?
Upvotes: 0
Views: 484
Reputation: 1575
Yes, you have to concern about security. I recommend to use sanitize-html.
Upvotes: 1