in reply to Very simple commenting system
Hi Zecho,
You can prevent both empty and whitespace names by matching one word character:
but it would also be well to apply escapeHTML to $message and s/[^\x00-\x1f\x7f]//g for ($user,$message); as well. That will knock off unprintable nasties.my $user = ( $q->param('user') =~ /\w/ ) ? $q->param('user') : "Anonym +ous";
A minor point, you probably should use '<br/>' for xhtml correctness.
Update: changed break tag comment per blackmateria's reply, Thanks!
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Very simple commenting system
by blackmateria (Chaplain) on Nov 19, 2001 at 07:14 UTC |