Small fix.

This commit is contained in:
takezoe
2013-06-04 21:05:08 +09:00
parent e58282a532
commit faf162a5f0

View File

@@ -2,6 +2,8 @@ package view
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,7 +21,7 @@ object helpers {
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(" ", "&nbsp;").replaceAll("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").replaceAll("\n", "<br>"))
/**
@@ -59,7 +61,8 @@ object helpers {
}
}
})
twirl.api.Html(html)
Html(html)
}
/**