Bug: pasting converts absolute into relative links

User Help for Mozilla Firefox
Locked
fiedorow
Posts: 3
Joined: April 17th, 2005, 11:22 am

Bug: pasting converts absolute into relative links

Post by fiedorow »

I am running into this bug or misfeature. When pasting html text within Firefox into some web site html editor window, all absolute urls refering to that site get automatically converted into relative urls. As an example if I send mail from gmail.google.com, an absolute link
href="http://gmail.google.com/test/test"
gets converted into
href="../test/test"

While this is an artificial example, at the web site I am running, users frequently paste links refering to other pages on the site in a discussion forum like this one. The forum postings are also emailed to the participants . The resulting email messages thus contain dysfunctional links. Worse yet our email server has been configured to scan both outgoing and incoming email for cloaked urls redirecting users to phishing sites. The dysfunctional urls in this email are interpreted as such, and lots of warnings are inserted into the emails about this, making them unreadable.

Is there any way to turn off this unwanted behavior in Firefox?
Guest
Guest

Post by Guest »

I'm thinking this is a feature of the HTML editor you're using, so you should look to it for answers. For example Firefox doesn't censor text that I paste into the textbox I'm using to type this message, even if the text happens to look like a URL.
fiedorow
Posts: 3
Joined: April 17th, 2005, 11:22 am

Post by fiedorow »

No, it's Firefox that is munging the URL on the pasting end. This is because the only URL's that are being munged are those which refer to the site into which I'm pasting the html text. URLs which refer to different sites are left alone. In the gmail example, only urls of the form http://gmail.google.com/something-or-other are affected. URLs like http://www.mozilla.org/something-or-other are left alone. The HTML editor in which I am composing the urls (Mozilla Composer) would have no idea into which window I would be pasting the text.
This forum here doesn't support WYSIWYG pasting of html text from Composer like gmail does, and this is the context in which this bug occurs.
Last edited by fiedorow on April 17th, 2005, 7:53 pm, edited 1 time in total.
User avatar
bytemaster
Posts: 1264
Joined: August 18th, 2003, 11:34 pm
Contact:

Post by bytemaster »

Firefox does not contain the Mozilla Composer code. Mozilla Composer code is used in the Mozilla Suite (seamonkey), Mozilla Thunderbird (for e-mail composition), and Nvu ( www.nvu.com ).

BTW, I do not seem to be having that problem on Gmail's site.
Brainbench Most Valuable Professional (MVP) for Computer Technical Support
www.brainbench.com - <a href="http://www.brainbench.com/xml/bb/transcript/public/viewtranscript.xml?pid=742832">view my transcript</a>
fiedorow
Posts: 3
Joined: April 17th, 2005, 11:22 am

Post by fiedorow »

I am not saying that Firefox contains Composer. I am running Composer (part of the old Mozilla suite) in a separate window from Firefox. I am pasting the text html containing various urls into a Firefox window displaying the my gmail.google.com account. The pasting is done in html WYSIWYG mode. The HTML editor there is running on the gmail.google.com server, interacting with Firefor using Javascript.

This is just for testing purposes to illustrate the bug. In the actual application I care about I have an HTML editor running on the server end like in gmail, and I am copying and pasting html/text in WYSIWYG mode between two such Firefox windows.

I should add that both the old Mozilla browser and Microsoft Internet Explorer behave correctly in both gmail and the application I am running on my web site, unlike Firefox.
I'm that Guest
Guest

Post by I'm that Guest »

I'm confused with this talk of Composer and Mozilla/Suite and gmail. I also thought the earlier gmail example was just for illustration, not a real example.
fiedorow wrote:it's Firefox that is munging the URL on the pasting end... The HTML editor in which I am composing the urls (Mozilla Composer) would have no idea into which window I would be pasting the text.
So you're doing this:
  1. while editing some local HTML page in Composer, you
  2. copy some text containing an embedded URL and
  3. paste it into the body field of a GMail Compose Mail window set in rich text mode displayed by Firefox, then
  4. send the message, and
  5. in the received message (and the Sent message stored on GMail) the URL is made relative if it happens to be a gmail.google.com URL.
That's my best guess at what's up, and that was really hard to piece together from your description.

So I tried just that and I see what you mean. My test message was sent with the gmail URL missing the host and actually the protocol, too. Another unrelated URL came through fine.

fiedorow wrote:No, it's Firefox that is munging the URL on the pasting end. This is because the only URL's that are being munged are those which refer to the site into which I'm pasting the html text. URLs which refer to different sites are left alone.
I don't see how that observation is helpful for fingering either suspect. In fact, if I (File Menu -> Save Page As (complete web page)) the GMail window just after step (3), the message source as saved to disk contains the URL undamaged.

That you're seeing this in other rich text editing fields besides in GMail, now that I'll agree does finger Firefox. I would say that the problem happens not in the Paste operation, but during serialization, when the rich text field is turned into a stream of text before the message is sent.

It does sound like a bug. Maybe you want to file a bug with Mozilla. Please do describe the situation a little better. I had a heck of a time understanding what was going on.
Locked