@@ 127,7 127,14 @@ plumburl(Url *u)
fd = plumbopen("send", OWRITE|OCEXEC);
if(fd<0)
return;
- plumbsendtext(fd, "castor9", nil, nil, u->raw);
+
+ char *msg;
+ if(strcmp(u->scheme, "mailto") == 0){
+ msg = u->path;
+ }else{
+ msg = u->raw;
+ }
+ plumbsendtext(fd, "castor9", nil, nil, msg);
close(fd);
freeurl(u);
}
@@ 606,7 613,7 @@ texthit(Panel *p, int b, Rtext *rt)
}else if(*link == '/'){
n = smprint("%s%s", urlparse(current_base_url, link)->raw, estrdup(link)+1);
}else{
- n = smprint("%s%s", urlparse(current_base_url, link)->raw, estrdup(link));
+ n = estrdup(link);
}
next_url = urlparse(nil, n);
}
@@ 223,7 223,7 @@ mklowcase(char *s)
static Url *
saneurl(Url *u)
{
- if(u == nil || u->scheme == nil || u->host == nil || Upath(u) == nil){
+ if(u == nil || u->scheme == nil || Upath(u) == nil){
freeurl(u);
return nil;
}