Support the ongoing development of Laravel.io →
Security Input Forms

I am looking at a way to strip those things from user input comments or posts in my project. I am using mews htmlPurifier however I didn't find a way to prevent that kind of data to be posted. HtmlPurifier has an Attr.IDBlacklistRegexp for conf file which I tried like this under default in config file to strip emails:

'Attr.IDBlacklistRegexp' => '/^[a-zA-Z0-9.!#$%&’+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)$/',

but it's not working. Any clue?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

chriz74x chriz74x Joined 8 Apr 2015

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.

© 2025 Laravel.io - All rights reserved.