[thelist] mailto links & Outlook subjects
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Fri Dec 17 21:18:42 CST 2004
Well, kick me in the thyroid and sing about Elvis -- you're
right. I tested every nuance of your claims, and they were dead on.
Thanks for taking a sledgehammer to my crusted-over assumptions.
Peter
-----Original Message-----
From: thelist-bounces at lists.evolt.org On Behalf Of Andrew Clover
<peter at easylistbox.com> wrote:
> You don't have to encode your ampersands in the querystring.
Not so. All HTML attributes, whether they contain URLs or anything else,
*must* escape ampersands (and less-than, and whichever quote character
is in use). href="foo?a=b&c=d" is invalid HTML and non-well-formed XML.
It will work in the average browser, until one of your parameters has
the same name as an HTML entity (eg. ?page=1§=3) at which point
it'll all go skewiff.
> In fact, if you do, you'll probably get some unwanted characters in
> your subject line.
No current browser has failed to unescape the ampersands in URLs for,
oh, a decade. Tim's code is correct.
Now, whether mailto: links with query strings are to be recommended is
another story...!
--
Andrew Clover
mailto:and at doxdesk.com
http://www.doxdesk.com/
More information about the thelist
mailing list