4
cheers John, at least you're also on the right page as me :)
Quote:
from 2.0.18 release notes:
Added sanitizing to XOOPS form elements to avoid XSS
if adding htmlspecialchars to form elements is classed as sanitizing then i'm stumped.
htmlspecialchars() isn't for sanitizing, it is for preventing user-inputted text from containing HTML markup tags.
note: prevention is not sanitizing.. sanitizing means to clean the text from malicious code etc, not to prevent html from being parsed.
so if you want to prevent html from being inputted by the user then by all means use htmlspecialchars.. but if you actually want to sanitize (clean) the users input of html then do not use htmlspecialchars.. i can't understand the reasoning behind it's use at all in many places on 2.0.18.
sanitize the input properly and there'd be no reason to prevent html in this case with htmlspecialchars.