Copy/Paste Long URLs

Sometimes when you get e-mails with long URLs in them from Outlook people, they show up broken like so:

http://www.deftone.com/blogzilla/archives/101_things_that_the_mozilla_browser
_can_do_that_ie_cannot.html

This is because Outlook wraps URLs longer than 72 characters, whereas Mozilla Mail does not :) To visit the above link, you'd have to manually rebuild the full url using copy/paste several times. If you copy/pasted both lines into the address bar, everything after the first line break would be stripped, so you'd have to go back and copy/paste each line of the url.

By adding this line,

user_pref("editor.singleLine.pasteNewlines", 3);

to your user.js file for Mozilla or Phoenix, all line breaks will be stripped out when you paste into the address bar.

Now if you tried copy/pasting the above URL, line breaks and all, the full URL appears with the line breaks stripped out. No more rebuilding long URLs.

***

On another note, sorry for the long absence. This site is not dead and will return to regular scheduled posts.

» posted by pinder on January 06, 2003 at 12:58 PM

Comments

Excellent tip, thanks!

# posted by komlenic

Is there any good reason not to set this as the default behaviour?

What are the results for values other than 3?

# posted by David Gerard

The other options for Newline paste behavior are:

0 = paste unchanged,
1 = paste only first line,
2 = replace with spaces,
3 = strip newlines

# posted by pinder

Yep, 3 should definitely be the default behaviour!

# posted by David Gerard

Err... Correction: the lines after the break are not stripped - the get wrapped! So just go to the end of a line and hit Delete. But the tip is of course great!

# posted by Nikolai Prokoschenko

Blogzilla lives! and what a great tip, thanks!!

# posted by adam

Post a Comment

This discussion has been closed.