[dev]Patch for IE mailto: links.
Michael Cochrane
mike@graftonhall.co.nz
Wed, 10 Jul 2002 08:53:41 +0100
This message is in MIME format.
---------------------- multipart/mixed attachment
Okay so i couldn't think of a descriptive subject that made sence...
Basically, with IMP.reg imported and IMP set as the default mail client in
windows. When a mailto link is clicked the url that is loaded is:
http://webmail.example.com/horde/imp?action=compose&to=%1
but %1 contains a full mailto: url, not just an addresses... so the 'to' value
is along the lines of:
mailto:mike@graftonhall.co.nz?subject=Im%20broken
So i modified IMP::getComposeArgs() to decode mailto: urls on the way through.
then found a new problem with Horde::addParameter that if the parameter allready
starts with a '?' it ends up with two '?''s at the start of the query section of
the url:
http://head.graftonhall.co.nz/horde/imp/compose.php??subject=Im+broken;to=mike%40graftonhall.co.nz
when php decodes this you end up with '?subject' as the key in the
$HTTP_GET_VARS array and so the field is never added into the compose window.
So no addParameter checks the first character of the parameter to make sure it's
not a '?' and if it is, it removes it.
So after all that: here's the patch to get it all working nicely again..
- Mike :-)
-------------------------------------------------------------------------
This mail sent from Mike's CVS HEAD install of IMP: http://horde.org/imp/
---------------------- multipart/mixed attachment
SW5kZXg6IGltcC9saWIvSU1QLnBocA0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9odHRwZC9ob3Jk
ZS9pbXAvbGliL0lNUC5waHAsdg0KcmV0cmlldmluZyByZXZpc2lvbiAxLjMwNA0KZGlmZiAtSSRI
b3JkZSAtSSRSZXZpc2lvbiAtSSREYXRlIC1yMS4zMDQgSU1QLnBocA0KNjU4YzY1OCw2NzMNCjwg
DQotLS0NCj4gICAgICAgICANCj4gICAgICAgICANCj4gICAgICAgICAvKiBkZWNvZGUgbWFpbHRv
OiB1cmwgKi8NCj4gICAgICAgICBpZiAoYXJyYXlfa2V5X2V4aXN0cygndG8nLCAkYXJncykgJiYg
c3RycG9zKCRhcmdzWyd0byddLCAnbWFpbHRvOicpID09PSAwKSB7DQo+ICAgICAgICAgICAgICRt
YWlsdG8gPSBAcGFyc2VfdXJsKCRhcmdzWyd0byddKTsNCj4gICAgICAgICAgICAgaWYgKGlzX2Fy
cmF5KCRtYWlsdG8pKSB7DQo+ICAgICAgICAgICAgICAgICAkYXJnc1sndG8nXSA9ICRtYWlsdG9b
J3BhdGgnXTsNCj4gICAgICAgICAgICAgICAgIHBhcnNlX3N0cigkbWFpbHRvWydxdWVyeSddLCAk
dmFscyk7DQo+ICAgICAgICAgICAgICAgICBmb3JlYWNoICgkZmllbGRzIGFzICR2YWwpIHsNCj4g
ICAgICAgICAgICAgICAgICAgICBpZiAoYXJyYXlfa2V5X2V4aXN0cygkdmFsLCAkdmFscykpIHsN
Cj4gICAgICAgICAgICAgICAgICAgICAgICAgJGFyZ3NbJHZhbF0gPSAkdmFsc1skdmFsXTsNCj4g
ICAgICAgICAgICAgICAgICAgICB9DQo+ICAgICAgICAgICAgICAgICB9DQo+ICAgICAgICAgICAg
IH0NCj4gICAgICAgICB9DQo+ICAgICAgICAgDQpJbmRleDogaW1wL3NjcmlwdHMvSW1wLnJlZw0K
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PQ0KUkNTIGZpbGU6IC9odHRwZC9ob3JkZS9pbXAvc2NyaXB0cy9JbXAucmVnLHYN
CnJldHJpZXZpbmcgcmV2aXNpb24gMS4zDQpkaWZmIC1JJEhvcmRlIC1JJFJldmlzaW9uIC1JJERh
dGUgLXIxLjMgSW1wLnJlZw0KMmEzLDUNCj4gW0hLRVlfTE9DQUxfTUFDSElORVxTT0ZUV0FSRVxD
bGllbnRzXE1haWxdDQ0KPiBAPSJJbXAiDQ0KPiANDQpJbmRleDogbGliL0hvcmRlLnBocA0KPT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PQ0KUkNTIGZpbGU6IC9odHRwZC9ob3JkZS9ob3JkZS9saWIvSG9yZGUucGhwLHYNCnJl
dHJpZXZpbmcgcmV2aXNpb24gMS4xNzINCmRpZmYgLUkkSG9yZGUgLUkkUmV2aXNpb24gLUkkRGF0
ZSAtcjEuMTcyIEhvcmRlLnBocA0KMzMxYTMzMiwzMzQNCj4gICAgICAgICAgICAgaWYgKHN1YnN0
cigkcGFyYW1ldGVyLDAsMSkgPT0gJz8nKSB7IA0KPiAgICAgICAgICAgICAgICAgJHBhcmFtZXRl
ciA9IHN1YnN0cigkcGFyYW1ldGVyLDEpOyANCj4gICAgICAgICAgICAgfQ==
---------------------- multipart/mixed attachment--