matthijs110's avatar

XSS protection raw HTML

Hello,

I am making a forum website where people can write their threads in a CKEDITOR. This editor outputs raw HTML. The HTML is shown using {!! $thread->body !!}.

Whenever someone writes a <script> tag, or an onclick attribute, it gets executed. I would like to prevent this, but still be able to display the HTML output.

What is the best way to handle this?

0 likes
3 replies
matthijs110's avatar

Works like a charm :-) I must have missed this package while searching :/

1 like

Please or to participate in this conversation.