Fixed and closed #525 : if mail link start with "mailto:" the wiki no more add "mailto:" to link address.

This commit is contained in:
Matteo Tomasini 2010-03-31 09:50:21 +00:00
parent 2c65f30a1c
commit 3a853ecdd8
2 changed files with 7 additions and 3 deletions

View file

@ -1702,7 +1702,11 @@ namespace ScrewTurn.Wiki {
sb.Append(@"<a");
if(!isImage) sb.Append(@" class=""emaillink""");
if(blank) sb.Append(@" target=""_blank""");
sb.Append(@" href=""mailto:");
if(targetUrl.StartsWith(@"mailto:")) {
sb.Append(@" href=""");
} else {
sb.Append(@" href=""mailto:");
}
sb.Append(Tools.ObfuscateText(targetUrl.Replace("&amp;", "%26"))); // Trick to let ampersands work in email addresses
sb.Append(@""" title=""");
if(!isImage && title.Length > 0) sb.Append(nstripped);