CSP would do the trick, though.
The other fix is properly escaping things before sticking them in your markup.
Or simply not displaying user data using a markup language with built-in remote code execution.
CSP would do the trick, though.
The other fix is properly escaping things before sticking them in your markup.