Wednesday, March 29, 2017

How to store html with inline style in database and prevent XSS

I need to store html in database to provide user with rich text editing functionality, but at the same time I wish to prevent any possible xss attacks. Is there something that I can use that would remove any harmful javascript while leaving my other html tags and inline style intact?

I am building my project in laravel 5.4

Thanks!



via jacobdo

Advertisement