control characters and Util::clean_text()
Max Kanat-Alexander
mkanat at bugzilla.org
Wed Dec 21 16:59:05 UTC 2005
On Wed, 2005-12-21 at 14:09 +0100, Frédéric Buclin wrote:
> So why
> not updating trim() to automatically remove such characters everywhere?
> This solution would be much less invasive.
I wouldn't object for the branches, but I'd definitely object for the
tip. A developer expects a function called trim() to only remove
whitespace. Functions should not have side effects.
Replacing most calls to trim() with a call to clean_text() shouldn't be
that hard, if that's what needs to be done.
I don't particularly see a pressing reason to remove control characters
in most cases, anyhow -- if somebody was silly enough to put a control
character into a field, perhaps they intended for it to appear there.
(Unless, of course, displaying the control character has some security
implication.)
-Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla Services. And Everything Else, too.
More information about the developers
mailing list