|
|
@ -71,7 +71,7 @@ namespace FLocal.Common.BBCodes { |
|
|
|
} |
|
|
|
} |
|
|
|
if(isExternal) { |
|
|
|
if(isExternal) { |
|
|
|
if(title == null) { |
|
|
|
if(title == null) { |
|
|
|
title = url; |
|
|
|
title = Safe(url); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
var linkInfo = URL.UrlManager.Parse(url, new System.Collections.Specialized.NameValueCollection(), true); |
|
|
|
var linkInfo = URL.UrlManager.Parse(url, new System.Collections.Specialized.NameValueCollection(), true); |
|
|
@ -80,13 +80,10 @@ namespace FLocal.Common.BBCodes { |
|
|
|
} |
|
|
|
} |
|
|
|
url = linkInfo.canonicalFull; |
|
|
|
url = linkInfo.canonicalFull; |
|
|
|
if(title == null) { |
|
|
|
if(title == null) { |
|
|
|
title = linkInfo.title; |
|
|
|
title = Safe(linkInfo.title); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
string result = "<a href=\"" + url + "\">" + Safe(title) + "</a>"; |
|
|
|
string result = String.Format("<a href=\"{0}\"{1}>{2}</a>", url, (isExternal ? " class=\"external\"" : ""), title); |
|
|
|
if(isExternal) { |
|
|
|
|
|
|
|
result += "<img src=\"/static/images/external.png\" border=\"0\"/>"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|