OK, found another potential bug/undocumented feature.
In the function create_form_field, change
Code:
if (isset($_REQUEST[$formelement])) { $form_field .= $_REQUEST[$formelement]; }
to
Code:
if (isset($_REQUEST[$formelement])) { $form_field .= htmlspecialchars($_REQUEST[$formelement], ENT_QUOTES); }
OK, and why do you think that this is a bug? it works fine without "htmlspecialchars"
a bug is about somthing that doesn't work right, you are accepting somthing different, thats called suggesting an approvement
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #2 on: Oct 22, 2006, 10:57:32 pm »
and at the end the test is not OK, better is
if (!empty($_REQUEST['var'])) {...
hehe
Atari ST fan
Posts: 7
54 credits Members referred : 0
« Reply #3 on: Oct 23, 2006, 09:38:02 pm »
haha, you're the one that used that test in the first place.
having htmlspecialchars just makes sense though. If the person uses a quote or something else, the new page WILL break, and leave a bad impression. Best to make it a little more foolproof.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
haha, you're the one that used that test in the first place.
having htmlspecialchars just makes sense though. If the person uses a quote or something else, the new page WILL break, and leave a bad impression. Best to make it a little more foolproof.
Of course your suggestion is not bad but don't tell people that this is a bug while it's based on you personal opinion. At the end this small details are up to the user, believe me if I use this class for a wide public I use more validation than only some basic html function. Check this class for real validation: http://www.finalwebsites.com/snippets.php?id=15
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4515