Converted Html.Link to return MvcHtmlString. Replaced unnecessary calls to <%= with <%: as a result of this change.

Added some unit tests for Html.Link.

--HG--
branch : dev
This commit is contained in:
Phil Haack
2010-06-09 23:06:36 -07:00
parent fa3c6a2854
commit 013638aca8
23 changed files with 97 additions and 28 deletions

View File

@@ -2,6 +2,6 @@
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><%=Html.Link(Html.Encode(Model.Item.Name), Url.Blog(Model.Item.Slug)) %></h3>
<h3><%: Html.Link(Model.Item.Name, Url.Blog(Model.Item.Slug)) %></h3>
<div class="blog meta"><a href="<%=Url.Blog(Model.Item.Slug) %>"><%: T("{0} post{1}", Model.Item.PostCount, Model.Item.PostCount == 1 ? "" : "s")%></a></div>
<div class="blogdescription"><p><%: Model.Item.Description %></p></div>