control characters and Util::clean_text()

Benton, Kevin kevin.benton at amd.com
Wed Dec 21 20:24:06 UTC 2005


> -----Original Message-----
> From: developers-owner at bugzilla.org [mailto:developers-owner at bugzilla.org]
> On Behalf Of Frédéric Buclin
> Sent: Wednesday, December 21, 2005 11:08 AM
> To: developers at bugzilla.org
> Subject: Re: control characters and Util::clean_text()
> 
> > As a result, I think we ought to do one of two things; 1) either treat
> > characters that are to be stripped as errors in the user's input, or 2)
> > we need to warn users that their input was modified by removing
> > unsupported characters.  Acting as if nothing happened is (in my mind)
> > unacceptable.
> 
> 
> Newlines and other control characters have nothing to do in a bug
> summary, a product version or a target milestone, etc... Silently
> removing these characters sounds fine to me. We are not going to remove
> these characters in comments, nor in product/component/group
> descriptions for instance, and of course not in attachments.
> 
> How could you corrupt checkins this way???

Modifying data given to a program without letting the user know it was modified in my mind is unacceptable.  There may be a reason why someone wants a carriage return in the summary, milestone, or version.  I don't know of any reasons off the top of my head at the moment, but as I mentioned, I don't think it's wise of us to modify user input without letting them know.

If we don't let them know, someone will file a bug telling us we aren't supporting their input.  If we let them know, at least then we tell them we chose not to support their data, then they can make the decision to modify the code or not.

I'm not against it because I have a concrete reason right now, however, from what I've seen in my experience with Perforce, I'm afraid that stripping characters without notifying users will set us up for a problem later.  Specifically, if we have UTF-16/32 LE/BE pairs that have some non-printable and some printable characters in the pair, we'll corrupt their data on import - something I work hard to avoid.

---
Kevin Benton
Perl/Bugzilla Developer/Administrator, Perforce SCM Administrator
Personal Computing Systems Group
Advanced Micro Devices
 
The opinions stated in this communication do not necessarily reflect the view of Advanced Micro Devices and have not been reviewed by management.  This communication may contain sensitive and/or confidential and/or proprietary information.  Distribution of such information is strictly prohibited without prior consent of Advanced Micro Devices.  This communication is for the intended recipient(s) only.  If you have received this communication in error, please notify the sender, then destroy any remaining copies of this communication.





More information about the developers mailing list