Fix for issue 16353

This commit is contained in:
smwhit
2010-04-06 17:17:39 +01:00
parent e41d711242
commit 4a88a8bf10

View File

@@ -187,10 +187,8 @@ namespace Orchard.Mvc.Html {
public static string Link(this HtmlHelper htmlHelper, string linkContents, string href, IDictionary<string, object> htmlAttributes)
{
TagBuilder tagBuilder = new TagBuilder("a")
{
InnerHtml = linkContents
};
TagBuilder tagBuilder = new TagBuilder("a")
{ InnerHtml = htmlHelper.Encode(linkContents) };
tagBuilder.MergeAttributes(htmlAttributes);
tagBuilder.MergeAttribute("href", href);
return tagBuilder.ToString(TagRenderMode.Normal);