diff --git a/rErrors.go b/rErrors.go index 2827147..e6252cf 100644 --- a/rErrors.go +++ b/rErrors.go @@ -47,9 +47,11 @@ func (this *WikiServer) servePageResponse(w http.ResponseWriter, r *http.Request } } -func (this *WikiServer) formatTimestamp(m int64) string { +func (this *WikiServer) formatTimestamp(m int64) template.HTML { // TODO add a more detailed timestamp on hover - return template.HTMLEscapeString(time.Unix(m, 0).In(this.loc).Format(this.opts.DateFormat)) + dt := time.Unix(m, 0).In(this.loc) + + return template.HTML(`` + template.HTMLEscapeString(dt.Format(this.opts.DateFormat)) + ``) } func (this *WikiServer) viewLink(articleTitle string) template.HTML { diff --git a/rHistory.go b/rHistory.go index ec51225..b6cff5c 100644 --- a/rHistory.go +++ b/rHistory.go @@ -39,7 +39,7 @@ func (this *WikiServer) routeHistory(w http.ResponseWriter, r *http.Request, art for _, rev := range revs { revIdStr := fmt.Sprintf("%d", rev.ID) content += `