Closed
Bug 160055
Opened 22 years ago
Closed 21 years ago
Copy Email Address should unescape e.g. %40 to @
Categories
(SeaMonkey :: UI Design, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aha, Assigned: bugzilla)
References
()
Details
(Keywords: polish, testcase)
Attachments
(2 files, 2 obsolete files)
242 bytes,
text/html
|
Details | |
1.70 KB,
patch
|
deanis74
:
review+
bzbarsky
:
superreview+
asa
:
approval1.5b+
|
Details | Diff | Splinter Review |
Repro: 1. open testcase 2. in context menu for e-mail link choose Copy Email Address Actual: in clipboard is string 'info%40mozilla.org' Expected: in clipboard should be string 'info@mozilla.org' 2002072818/trunk/W2K
Reporter | ||
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
The issue is broader than specified in the Summary. Better title: "Copy Email Address should unescape encoded characters (e.g., %40 to '@')" The case that brought me here demonstrates greater annoyance: 1. browse to http://www.pcnineoneone.com/downloads/games.html 2. scroll to base of document 3. right-click on the word 'Webmaster' 4. select 'Copy Email Address' from context menu 5. paste into another application (I used PINE) Result: "%57%65%62%6D%61%73%74%65%72%40%50%43%4E%69%6E%65%4F%6E%65%4F%6E%65%2E%63%6F%6D" In a word, "Argh!" People do this sort of thing to fool email-grabbin' spiders. I'd just release a spider that unescapes encoded characters in HREF values beginning with the mailto: pseudo-protocol, but whatever floats other people's boats...
Comment 3•22 years ago
|
||
btw, I see this with a Mozilla nightly, build id 2002090608 on Windows 98 -- I'm guessing the problem is not specific to Windows 2000 as indicated in the original report.
Comment 4•22 years ago
|
||
Updated•22 years ago
|
Attachment #109826 -
Flags: superreview?(jaggernaut)
Attachment #109826 -
Flags: review?(blaker)
Updated•22 years ago
|
Updated•21 years ago
|
Attachment #109826 -
Flags: review?(blake) → review?(dean_tessman)
Comment on attachment 109826 [details] [diff] [review] Proposed patch Components.interfaces.nsIClipboardHelper ); >- clipboard.copyString(addresses); >+ clipboard.copyString(unescape(addresses)); Am I right in assuming that this is the only relevant portion of the patch?
Comment 6•21 years ago
|
||
Oops, I should have checked that I didn't have any other outstanding patches in that directory before diffing it - but feel free to review them too ;-)
Comment on attachment 109826 [details] [diff] [review] Proposed patch >- clipboard.copyString(addresses); >+ clipboard.copyString(unescape(addresses)); r=me on this change. File another bug telling me what those other changes do, and I'll try to review them.
Attachment #109826 -
Flags: review?(dean_tessman) → review+
Comment 8•21 years ago
|
||
Attachment #109826 -
Attachment is obsolete: true
Comment 9•21 years ago
|
||
Comment on attachment 129603 [details] [diff] [review] Extract of patch Transferring r=
Attachment #129603 -
Flags: superreview?(bz-vacation)
Attachment #129603 -
Flags: review+
Comment 10•21 years ago
|
||
Comment on attachment 129603 [details] [diff] [review] Extract of patch This will unescape using the charset of the document whose window.unescape is being called. In this case, that's the XUL document, which is in UTF-8. If the page is not also in UTF-8, you get intl bugs. You want to unescape using the right charset (probably by looking up the window.unescape for the window the target document lives on, using the lookupGetter stuff, and using that).
Attachment #129603 -
Flags: superreview?(bz-vacation) → superreview-
Comment 11•21 years ago
|
||
Attachment #129603 -
Attachment is obsolete: true
Comment 12•21 years ago
|
||
Comment on attachment 129611 [details] [diff] [review] Appropriated some code from tabbrowser.xml :-) Pick one you think is more suitable and change the other :-)
Attachment #129611 -
Flags: superreview?(bz-vacation)
Attachment #129611 -
Flags: review?(bz-vacation)
Comment 13•21 years ago
|
||
Comment on attachment 129611 [details] [diff] [review] Appropriated some code from tabbrowser.xml :-) There we go. Thanks. ;) There is some code in contentAreaUtils.js that calls unescape that could use fixing; could you file a bug on that?
Attachment #129611 -
Flags: superreview?(bz-vacation)
Attachment #129611 -
Flags: superreview+
Attachment #129611 -
Flags: review?(dean_tessman)
Attachment #129611 -
Flags: review?(bz-vacation)
Comment 14•21 years ago
|
||
Comment on attachment 129611 [details] [diff] [review] Appropriated some code from tabbrowser.xml :-) Sure, looks good. It could probably be written a little differently to not have a blank exception handler, but this way serves the purpose.
Attachment #129611 -
Flags: review?(dean_tessman) → review+
Comment 15•21 years ago
|
||
Hmmm... that code that calls unescape... it does try to unescape twice, once in UTF-8 (as you noticed) and once in a guessed character set...
Comment 16•21 years ago
|
||
Comment on attachment 129611 [details] [diff] [review] Appropriated some code from tabbrowser.xml :-) Useful patch to make Copy Email Address work on addresses with obfuscated or international characters.
Attachment #129611 -
Flags: approval1.5b?
Comment 17•21 years ago
|
||
Comment on attachment 129611 [details] [diff] [review] Appropriated some code from tabbrowser.xml :-) a=asa (on behalf of drivers) for checkin to Mozilla 1.5beta.
Attachment #129611 -
Flags: approval1.5b? → approval1.5b+
Comment 18•21 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 19•21 years ago
|
||
*** Bug 189516 has been marked as a duplicate of this bug. ***
Comment 20•21 years ago
|
||
Same bug for Firebird: bug 215993
Updated•21 years ago
|
Attachment #109826 -
Flags: superreview?(jag)
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•