nliautaud / p01contact

Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
MIT License
16 stars 15 forks source link

Blacklist / Whitelist / textarea #53

Open gs58muse opened 4 years ago

gs58muse commented 4 years ago

Hi Nicolas, some ideas for improvements:

i think it's better to make the "isBlacklisted" Function caseinsensitive. (P01contact_Field.php - Line: 164) In textareas i want to blacklist e.g. "href=,class=,id= ..." - but in the current version the function works only if the input is exactly like my values in the Backend.

I changed Line 174 + 176 to: Line 174: $content = array_filter(explode(',', strtolower($cl->content))); Line 176: $found = preg_match("$avoid", strtolower($this->value));

this works for me.

I also added the maxlength-attribute to "