Strip leading and trailing whitespace from all single-line fields

Bug #44197 reported by David Allouche
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

The specific issue I encountered is that we allow trailing whitespace in URL fields. Though it's technically legit (since we accept non-urlescaped urls), trailing whitespace in a URL is almost always a mistake.

The url widget should strip leading and trailing whitespace.

More generally (I asked mpt about it too), there is no use case for accepting leading or trailing whitespace in any single line field, and there is a significant potential for error.

All single line text widgets should strip leading and trailing whitespace.

Revision history for this message
David Allouche (ddaa) wrote :

Related to bug 41325 (people displaynames) and bug 34105 (bugwatches). These are particular cases of this bug.

Changed in launchpad:
assignee: nobody → matsubara
status: Unconfirmed → Confirmed
Changed in launchpad:
assignee: matsubara → nobody
Revision history for this message
Diogo Matsubara (matsubara) wrote :

Bug 111289 (question/bug titles) is another specific case of this bug.

Revision history for this message
Jonathan Lange (jml) wrote :

Bug 488742 was caused by this bug (code import URLs)

Revision history for this message
Robert Collins (lifeless) wrote :

Seems like a solid root-cause thing to me :)

Changed in launchpad:
importance: Medium → High
Revision history for this message
Curtis Hovey (sinzui) wrote :

We have fields that do the right thing. I think some fields need to change their parent class.

Changed in launchpad:
importance: High → Low
tags: added: trivial
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.