|
|
@ -57,15 +57,21 @@ namespace FLocal.Common.BBCodes { |
|
|
|
if(title == null) { |
|
|
|
if(title == null) { |
|
|
|
title = link; |
|
|
|
title = link; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
bool isExternal = true; |
|
|
|
string url; |
|
|
|
string url; |
|
|
|
if(shortenRelative) { |
|
|
|
if(shortenRelative) { |
|
|
|
var urlInfo = UrlProcessor.Process(link); |
|
|
|
var urlInfo = UrlProcessor.Process(link); |
|
|
|
url = urlInfo.relativeUrl; |
|
|
|
url = urlInfo.relativeUrl; |
|
|
|
|
|
|
|
isExternal = !urlInfo.isLocal; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
var urlInfo = new Uri(link); |
|
|
|
var urlInfo = new Uri(link); |
|
|
|
url = urlInfo.ToString(); |
|
|
|
url = urlInfo.ToString(); |
|
|
|
} |
|
|
|
} |
|
|
|
return "<a href=\"" + url + "\">" + title + "</a>"; |
|
|
|
string result = "<a href=\"" + url + "\">" + title + "</a>"; |
|
|
|
|
|
|
|
if(isExternal) { |
|
|
|
|
|
|
|
result += "<img src=\"/static/images/external.png\" border=\"0\"/>"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|