Open Bug 219675 Opened 21 years ago Updated 2 years ago

Paste HTML from browser/message into new message: anchor links are mangled

Categories

(MailNews Core :: Composition, defect)

x86
All
defect

Tracking

(Not tracked)

People

(Reporter: WEConsultants, Unassigned)

References

Details

(Keywords: reproducible)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.5b) Gecko/20030917
Build Identifier: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.5b) Gecko/20030917

Problem: bad href to named anchor. Points to local 
mailbox:///C%7C/WINDOWS/APPLICATION%20DATA/Mozilla/Profiles/default
for link reference...so other users, who recieve the email, can not use the
links to the same email.

Users were complaining that they could not use the links to other parts of the
email.

This started since I started to use the windows version of Mozilla. I ever had 
this problem using the Linux Mozilla version...!

Reproducible: Always

Steps to Reproduce:
1.build a large html file(321k newsletter) in composer
2.save it to a localfile system
3.cut & past to a new email
4.save email to  draft folder, email size becomes 3883k.
4.open this draft email again and resave email to draft folder, email size
becomes 346k.
5..open this draft email again and send
6.save set email to file and ckeck the html.
Actual Results:  
The link now points to a href of
mailbox:///C%7C/WINDOWS/APPLICATION%20DATA/Mozilla/Profiles/default

Expected Results:  
The link should point to a href within the email and not thru the local mailbox.

I have included an example of one link thru the email below:

==========================================================================================
Originaly built and finished in Composer.... file size = 321k
==========================================================================================

     <td
 style="height: 20px; width: 90%; text-align: left; vertical-align: middle;
color: rgb(204, 0, 0); font-family: verdana;">
      <ul>
        <li><small>An Open Source Letter to Whom, SCO?<br>
          </small></li>
      </ul>
      </td>
      <td

 name="An_Open_Source_Letter_to_Whom_SCO"></a>An Open Source Letter to Whom,
SCO?</span><br style="font-family: verdana;">

==========================================================================================
After cut, past and saved in an email from Composer... file size = 3883k
==========================================================================================

      <td
 style="height: 20px; width: 90%; text-align: left; vertical-align: middle;
color: rgb(204, 0, 0); font-family: verdana;">
      <ul>
        <li><small>An Open Source Letter to Whom, SCO?<br>
          </small></li>
      </ul>
      </td>
      <td
 style="white-space: nowrap; height: 20px; width: 10px; text-align: center;
vertical-align: middle; background-color: rgb(255, 255, 255); font-family:
verdana;"><small><small><span
 style="font-size: 10pt; color: rgb(51, 102, 255);"><a
 href="cid:part1.06040003.02000300@comcast.net">Read</a>...</span>
</small></small></td>
    </tr>
    <tr>
      <td



     <td
 style="height: 20px; width: 90%; text-align: left; vertical-align: middle;
color: rgb(204, 0, 0); font-family: verdana;">
      <ul>
        <li><small>An Open Source Letter to Whom, SCO?<br>
          </small></li>
      </ul>
      </td>
      <td
 style="white-space: nowrap; height: 20px; width: 10px; text-align: center;
vertical-align: middle; background-color: rgb(255, 255, 255); font-family:
verdana;"><small><small><span
 style="font-size: 10pt; color: rgb(51, 102, 255);"><a
 href="#An_Open_Source_Letter_to_Whom_SCO">Read</a>...</span> </small></small></td>
    </tr>
    <tr>
      <td


style="font-family: verdana; font-weight: bold; color: rgb(204, 0, 0);"><a
 name="An_Open_Source_Letter_to_Whom_SCO"></a>An Open Source Letter to
Whom, SCO?</span><br style="font-family: verdana;">

============================================================================================
Final email after saved once again.... file size = 346k
============================================================================================

style="height: 20px; width: 90%; text-align: left; vertical-align: middle;
color: rgb(204, 0, 0); font-family: verdana;">
      <ul>
        <li><small>An Open Source Letter to Whom, SCO?<br>
          </small></li>
      </ul>
      </td>
      <td
 style="white-space: nowrap; height: 20px; width: 10px; text-align: center;
vertical-align: middle; background-color: rgb(255, 255, 255); font-family:
verdana;"><small><small><span
 style="font-size: 10pt; color: rgb(51, 102, 255);"><a
 href="mailbox:///C%7C/WINDOWS/APPLICATION%20DATA/Mozilla/Profiles/default/5w7gkfjs.slt/Mail/MAIL.COMCAST.ET/Drafts?number=945&amp;part=1.2&amp;filename=Article%20Issue%20Vol.%2009%20issue%2015.html">Read</a>...</span>
      </small></small></td>
    </tr>
    <tr>
      <td



 style="font-family: verdana; font-weight: bold; color: rgb(204, 0, 0);"><a
 name="An_Open_Source_Letter_to_Whom_SCO"></a>An Open Source Letter to
Whom, SCO?</span><br style="font-family: verdana;">
</small>
<div style="text-align: justify;"><small><span
 style="font-family: verdana;">When Darl McBride sent his open letter
to the open source community, I</span><span
 style="font-family: verdana;"></span></small><span
 style="font-family: verdana;"><small><span
 style="font-family: verdana;"> </span></small></span><small><span
 style="font-family: verdana;">was especially struck by the offer to
work with the community to work</span><span
 style="font-family: verdana;"></span></small><span
 style="font-family: verdana;"><small><span
 style="font-family: verdana;"> </span></small></span><small><span
 style="font-family: verdana;">out various IP issues and perhaps a new
"design a new business model</span><span style="font-family:
verdana;"></span></small><span
 style="font-family: verdana;"><small><span
 style="font-family: verdana;"> </span></small></span><small><span
 style="font-family: verdana;">that enhances the stability and
trustworthiness of the Open Source</span><span
 style="font-family: verdana;"></span></small><span
 style="font-family: verdana;"><small><span
 style="font-family: verdana;"> </span></small></span><small><span
 style="font-family: verdana;">community in the eyes of enterprise
customers." Many members of the</span><span
 style="font-family: verdana;"></span></small><span
 style="font-family: verdana;"><small><span
 style="font-family: verdana;"> </span></small></span><small><span
 style="font-family: verdana;">community, from everyday desktop users
right on up to Linus Torvalds,</span><span style="font-family:
verdana;"></span></small><span
 style="font-family: verdana;"><small><span
 style="font-family: verdana;"> </span></small></span><small><span
 style="font-family: verdana;">jumped on the statements made by </span></small><span
 style="font-family: verdana;"><small><span
 style="font-family: verdana;">&#8230;&lt; <a
 href="http://newsvac.newsforge.com/article.pl?sid=03/09/14/0132224">Read
Article</a> &gt;</span></small></span><br>
Same as 215248
There is a slight difference in this bug and 215248.

Here I do not recieve any error as in 215248 and another bug I just posted, Bug
219340.

The html generated is different also.
Ed Taylor, bug 216154 (to which the suggested dupe in comment 1 was itself duped 
to) has been fixed -- as you are aware.  Nightly builds have been available for 
a while -- have you gotten one yet?  If so, does this bug still exist?

If not, please mark this bug as a dupe of 216154.
I am now running on: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6b)
Gecko/20031205.

Problem still exists.
After working on some related bugs, I've returned to looking at this.  It was 
not easy to figure this out; the original report has a lot of useless detail 
about the size of the message, but skimps on the detail around step 3 "cut & 
past to a new email."

I find that copying-and-pasting from a Mozilla HTML rendering (message or 
document) to an HTML composition (message or document) will change links that 
point to a local data source.  In order to get a "mailbox:"-style link, I 
believe you have to be copying from a message in one of your mailboxes[1]; 
that's the only way I was able to reproduce it.
  [1] The HTML document can exist in the mailbox as an attachment, or as the
  message body if you can figure out how to create a message body with
  unqualified anchor links in the first place.

If instead you load the original HTML file into a browser, copy from there and 
paste it into the mail composer, the links are qualified to file:// (at the time 
of the paste) and then to cid:// links when the file is saved (as draft) or 
sent.  (And for anchor'd links, one copy of the original HTML document is copied 
into the message, as a MIME part, for *each* anchor -- bug 236178.)

Workaround: Instead of pasting the HTML from the browser, select  Insert|HTML
and paste the HTML source into the window.  (Note that the relatively-specified 
links will not display as links in the compose window; I'll find or open a bug 
for that issue separately, but see bug 228184.)  Because the workaround exists, 
I'm dropping the severity of this bug.

Reproduced with
  Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040610
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: other → Windows 2000
Summary: bad href to named anchor. Points to local mailbox:///C → Paste HTML from browser/message into new message: anchor links are mangled
(In reply to comment #7)
> (Note that the relatively-specified links will not display as links in the
> compose window; I'll find or open a bug for that issue separately

Bug 229025
Product: MailNews → Core
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Filter on "Nobody_NScomTLD_20080620"
QA Contact: esther → backend
Product: Core → MailNews Core
This bug exist yet in "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5". 

Always reproducible with the scenario I described in bug 382807

Does this still reproduce?

Component: Backend → Composition
Flags: needinfo?(de.berberich)

I'm unable to reproduce the set-up, too complicated ... I'm sorry.

Flags: needinfo?(de.berberich)

no problem

Steps to Reproduce from bug 382807 (not retested)

1.Edit a new mail
2.Insert an hyperlink which points to a local file (ie file:///C:/dir1/dir2/myfile.pdf)
3.Save the new mail as a draft and close the window
4.Select saved message in the draft folder and click on the link. The attachment is opened correctly.
5.Display saved draft source code. the link points to "cid:part1.03070601.06050601@domain.fr"
6.Open the new draft and send it.
7.In the Send folder, select the mail and display its source code. The link is like "mailbox:///C%7C/Documents%20and%20Settings/USER/Application%20Data/Thunderbird/Profiles/azerty.default/Mail/Local%20Folders/Drafts?number=84840&part=1.2&filename=myfile.pdf"
and the mail doesn't contain any attachment. The link refers to the local draft folder.
8.Close the source code window; select the mail and click on the link. Nothing happens.
9.Open the mailbox which has received the mail
10.Click on the link. Nothing happens
11.Display the mail source code. The link is same as viewed in send mail.

Actual Results:
The mail received contains an inline attachment link which doesn't work

Expected Results:
The mail received contains an inline attachment link which works fine

(In reply to Wayne Mery (:wsmwk) from comment #15)

no problem

Steps to Reproduce from bug 382807 (not retested)

Thank you, this time I got it and now I can reproduce this issue in TB 60.6.1 on a Mac running High Sierra.

Thank you for testing

Keywords: reproducible
OS: Windows 2000 → All
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: