Closed Bug 81238 Opened 23 years ago Closed 23 years ago

URLs in inserted links encoded twice

Categories

(MailNews Core :: Composition, defect, P1)

x86
Windows NT

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: phil, Assigned: nhottanscp)

Details

(Keywords: dataloss, Whiteboard: [nsbeta1+] Ready for check-in)

Attachments

(3 files)

Using 5/16 commercial build on Windows NT 1. Open HTML mail composition window 2. Type some text and create a link 3. Paste in a URL which includes commas (0x2C). I used a bugzilla link to a list of comma separated bug numbers 4. Send the message 5. When you receive the message, %2C has been encoded as %252C. Since % == 0x25, it appears the URL has been encoded twice.
dataloss, mozilla0.9.1, nsbeta1
apparently my status from this week was affected by this. moving to 0.9.1. cc'ing ducarroz and beppe.
Priority: -- → P1
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9.1
I'm able to reproduce with just using editor. using the "insert link dialog", I paste http://bugzilla.mozilla.org/buglist.cgi? bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=sspitzer&emailtype 1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bu gidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalu e=&target_milestone=mozilla0.9.1&short_desc=&short_desc_type=substring&long_desc =&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&status_whit eboard=&status_whiteboard_type=substring&keywords=&keywords_type=anywords&field0 -0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&newqueryname=&order=% 22Importance%22 I'll attach the generated html.
wait, that link (while doubly encoded) works if I click on it in IE and mozilla.
I'll attach a test case which doesn't work
Attached file test case (deleted) —
I've to check if my checkin caused this. Will update soon.
The string seems to be encoded ( doubly ) even before reaching the parser.
adding cmanske. this is an editor problem, too. not just mail compose.
Summary: URLs in outgoing HTML email encoded twice → URLs in inserted links encoded twice
things look ok at onOk() after the call to editorShell.CloneAttributes() in EdLinkProps.js. handing the baton to cmanske
Assignee: sspitzer → cmanske
...because from that point on it's in editor's court (or lower)
Keywords: mailtrack
The first example (having multiple URLs separated by commas) seems like a "bad thing to do! We only make one link to the selected text. Is your intent to make one link to all that text? The second example seems more important. We don't do any special encoding in editor, but NHotta recently adding encoding processing for URLs in connection with bug 74137. CC'ing him.
Let me take a look, it may be related to my check in for bug 74137.
Assignee: cmanske → nhotta
nsEscape() escapes '%' too, so I need to exclude it from the input. I'll attach a patch.
Status: NEW → ASSIGNED
Charley, could you review the patch?
r=cmanske
Asked jst for a super review.
nhotta: Also, CC your patch to reviewers@mozilla.org.
yes, I cc-ed to reviewers@mozilla.org.
> The first example (having multiple URLs separated by commas) seems like a "bad > thing to do! It isn't multiple URLs. It's just commas in one URL. For example (and I'm making up the syntax) http://bugzilla.mozilla.org/query.cgi?buglist=12,34,56,78
Yes, sorry, Phil! That should work (once patch is checked in.)
sr=jst
Whiteboard: [nsbeta1+] → [nsbeta1+] Ready for check-in
checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Using build 2001-05-31 on win, mac and linux I created a Bugzilla query with a string of bug numbers separated by commas. I did a Send Page from each platform and I also brought up a HTML compose window and inserted the bug query string as a link and sent them to myself. I then read each of these, clicked on the links and viewed the correct bug query and the string in the location. %2c was in the string instead of %252c which is what I saw with Phils attached mail msg. Verified.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: