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

NEW
Unassigned

Status

MailNews Core
Backend
15 years ago
8 years ago

People

(Reporter: Ed Taylor, Unassigned)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
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>

Comment 1

15 years ago
Same as 215248
(Reporter)

Comment 2

15 years ago
Created attachment 131743 [details]
intial html file built in Composer
(Reporter)

Comment 3

15 years ago
Created attachment 131744 [details]
final email file sent from mail composer
(Reporter)

Comment 4

15 years ago
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.

Comment 5

15 years ago
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.
(Reporter)

Comment 6

15 years ago
I am now running on: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6b)
Gecko/20031205.

Problem still exists.

Comment 7

14 years ago
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

Comment 8

14 years ago
(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
(Assignee)

Updated

10 years ago
Product: Core → MailNews Core

Updated

8 years ago
Duplicate of this bug: 382807

Comment 12

8 years ago
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
You need to log in before you can comment on or make changes to this bug.