Support the ongoing development of Laravel.io →
Input Forms Validation
Last updated 1 year ago.
0

Would you rather (reject the input and error) or (accept the input, but strip HTML tags from the input)?

Last updated 1 year ago.
0

I would reject it, becuase I expect user to input comment.

Last updated 1 year ago.
0

For comments I'd rather go with stripping the HTML tags out. I couldn't be bothered to rewrite a comment, really. Something like HTMLPurifier will let you do that. It'll allow certain HTML tags, like p or a, but will strip everything else. It'll also let you fix the HTML by closing missing tags, etc.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mehmet mehmet Joined 18 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.