diff --git a/src/main/scala/view/helpers.scala b/src/main/scala/view/helpers.scala index 7c82131..ad47676 100644 --- a/src/main/scala/view/helpers.scala +++ b/src/main/scala/view/helpers.scala @@ -2,6 +2,8 @@ import java.util.Date import java.text.SimpleDateFormat +import twirl.api.Html + import org.pegdown._ import org.pegdown.LinkRenderer.Rendering import org.pegdown.ast.WikiLinkNode @@ -19,9 +21,9 @@ def date(date: Date): String = new SimpleDateFormat("yyyy/MM/dd").format(date) // TODO escape html tags using HtmlEscapeUtils (Commons Lang) - def format(value: String): twirl.api.Html = twirl.api.Html( + def format(value: String): Html = Html( value.replaceAll(" ", " ").replaceAll("\t", "    ").replaceAll("\n", "
")) - + /** * Converts the issue number and the commit id to the link. */ @@ -59,7 +61,8 @@ } } }) - twirl.api.Html(html) + + Html(html) } /**