@@ 606,6 606,8 @@ texthit(Panel *p, int b, Rtext *rt)
next_url = urlparse(nil, link);
}else if(strbeg(link, "//") == 0){
next_url = urlparse(nil, smprint("gemini:%s", link));
+ }else if(strbeg(link, "mailto:") == 0){
+ next_url = urlparse(nil, link);
}else{
/* assuming relative URL */
if(strcmp(link, "/") == 0){
@@ 613,7 615,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 = estrdup(link);
+ n = smprint("%s%s", urlparse(current_base_url, link)->raw, estrdup(link));
}
next_url = urlparse(nil, n);
}