add mailto: support to exmhcomp (+patch)
Alexander Zangerl <[email protected]> Mon, 07 Mar 2005 20:31:49 +1000
| Newsgroups | gmane.mail.exmh.devel |
|---|---|
| Message-ID | <[email protected]> |
it would be very nice if exmhcomp did support processing
of mailto: urls. (some webbrowsers allow external handlers for
such urls.)
as exmh has the Msg_Mailto procedure for just that purpose,
adding this as a send argument to exmhcomp is trivial; could somebody
with cvs commit rights please add the attached few lines of patch?
there's two minor problems remaining with mailto handling in exmh in general:
.) why is MsgDecodeURL (which is used to un-urlencode) only implemented
for a very few characters? why not use the equivalent of this:
proc urldec { s }
{subst -nocom -novar [string map {\\ \\\\ %\n "" % \\u00} $s]}
(maybe plus extra handling of %0d and %0a)
in my humble opinion, being generous with what is accepted would be a
good idea here; the url rfcs only say that certain characters must be
encoded but don't prohibit encoding of others.
mailto: urls with other than the few recognised encoded characters currently
don't work in exmh; they are passed undecoded.
.) rfc2368, section 2 says that & must be treated specially
if in html context, because a) it delimits the header components in the
mailto scheme and b) html uses it as the character entity special character.
(don't we all *love* mixing contexts and the associated quoting rules! *yuck*)
rfc2368 says "use &" - which confuses exmh badly, because the code
splits the url at the & characters. the alternative, using %26, doesn't
work as MsgDecodeURL doesn't substitute it (sofar).
suggestion: before splitting the url, why not subst all '&'
occurrences by '%26', then doing the split and having MsgDecodeURL clean
up things later, when the semantic of & is no longer important.
regards
az
--
+ Alexander Zangerl + DSA 42BD645D + (RSA 5B586291)
Emacs is a nice operating system, but I prefer UNIX. - Tom Christiansen
_______________________________________________
Exmh-workers mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/exmh-workers
04_exmhcomp.dpatch
(application/octet-stream, 633 B) - not displayed
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCLC2mpy/2bEK9ZF0RAiOIAJ9Y1iZNQ5wNvs//l4gQ3whR7RsqkQCeMJ8b Jq4fvMyMV5NDhsluPbUaSgo= =2LSa -----END PGP SIGNATURE-----