4 years ago

Is there any HTML purifier for laravel, I want to allow only some tags

Posted 4 years ago by saqueib

I have a forum where user can post topics, from front-end they can insert only bold, italics, underline, strike through, insertLink, insert Image tags.

How I can sanitize this request from Laravel end, I want to store only tags allowed and get rid of extra stuff with inline styles.

Does Laravel 5.1 provide anything to do it, or only 'strip_tags($html, $allowedTags)' is enough.

Please sign in or create an account to participate in this conversation.