Use view.helpers functions as helpers.xxx

This commit is contained in:
takezoe
2013-04-21 03:53:05 +09:00
parent 48e052a900
commit 29c0e73caf
5 changed files with 17 additions and 17 deletions

View File

@@ -15,7 +15,7 @@ object helpers {
def date(date: Date): String = new SimpleDateFormat("yyyy/MM/dd").format(date)
// TODO escape html tags using HtmlEscapeUtils (Commons Lang)
def text(value: String): twirl.api.Html = twirl.api.Html(
def format(value: String): twirl.api.Html = twirl.api.Html(
value.replaceAll(" ", "&nbsp;").replaceAll("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").replaceAll("\n", "<br>"))
/**