Closed Bug 490713 Opened 15 years ago Closed 6 years ago

Convert newlines to empty only for URLs; convert to spaces for other

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: Mardak, Unassigned)

References

Details

(Whiteboard: ux-errorprevention)

We switched to newline -> empty to address issues of http://line-wrapped
urls/

I've been running into issues where I copy/paste addresses with keywords like "map" and the street gets concated with the city.

We could be smarter and only convert newlines to empty if it's uri-like.
Whiteboard: ux-errorprevention
could you please add a reference to the bug that changed the behavior?
I'm not really sure anymore.. I thought this was a recent change because I noticed something strange happening, so I changed my prefs not too long ago. But the only thing I can find is bug 406062 which actually makes newlines turn into spaces (value 2): http://kb.mozillazine.org/Editor.singleLine.pasteNewlines

And faaborg mentioned that we remove newlines to handle split urls.. hrmm...
Depends on: 406062
I changed the behavior of the URL bar in bug 23485. The meat of the behavior is in bug 253481, and happens way down in the editor code.
http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/text/nsTextEditRules.cpp#571
Depends on: 23485
No longer depends on: 406062
Citing Matthieu from bug 23485 comment 130:

Pasting
http://goodsite.com
.badsite.com/

Brings me to http://goodsite.com.badsite.com/ while displaying
http://goodsite.com ...
Hb: that is an ancient comment that predates my change. You'll find that if you actually try that on a current Firefox (3.0.x or later), that the URLbar both loads and displays "http://goodsite.com.badsite.com/".
For data urls it should convert new line to space:

data:text/html,<input required autofocus required autofocus required autofocus
required autofocus required autofocus required autofocus>

After copying this to location bar words "required" and "autofocus" are joined, should be separate
It works ok when copying from textarea
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.