When can I consider my use of dangerouslySetInnerHTML() safe?

Viewed 2151

Reading the scary doc, I know that if I provide the wrong arguments to dangerouslySetInnerHTML(), my trousers are down for XSS. What must I do upstream of this function call to be sure that I can use it safely? Look for and strip <script> tags from user input? What else?

1 Answers
Related