mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
Small fix.
This commit is contained in:
@@ -2,6 +2,8 @@ package view
|
|||||||
import java.util.Date
|
import java.util.Date
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
|
|
||||||
|
import twirl.api.Html
|
||||||
|
|
||||||
import org.pegdown._
|
import org.pegdown._
|
||||||
import org.pegdown.LinkRenderer.Rendering
|
import org.pegdown.LinkRenderer.Rendering
|
||||||
import org.pegdown.ast.WikiLinkNode
|
import org.pegdown.ast.WikiLinkNode
|
||||||
@@ -19,7 +21,7 @@ object helpers {
|
|||||||
def date(date: Date): String = new SimpleDateFormat("yyyy/MM/dd").format(date)
|
def date(date: Date): String = new SimpleDateFormat("yyyy/MM/dd").format(date)
|
||||||
|
|
||||||
// TODO escape html tags using HtmlEscapeUtils (Commons Lang)
|
// 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", "<br>"))
|
value.replaceAll(" ", " ").replaceAll("\t", " ").replaceAll("\n", "<br>"))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,7 +61,8 @@ object helpers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
twirl.api.Html(html)
|
|
||||||
|
Html(html)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user