v0.2.2
Fixed: * html/template requires escaping comments you explicitly want rendered as a template.HTML type.
This commit is contained in:
@@ -2,6 +2,7 @@ package server
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
`fmt`
|
`fmt`
|
||||||
|
`html/template`
|
||||||
`net/url`
|
`net/url`
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -62,3 +63,15 @@ func (p *Page) RenderIP(indent uint) (s string) {
|
|||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *Page) RenderReqId() (s template.HTML) {
|
||||||
|
|
||||||
|
s = template.HTML(
|
||||||
|
fmt.Sprintf(
|
||||||
|
"<!-- Request ID: %s -->",
|
||||||
|
p.ReqUUID.String(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{{- $linkico := "🔗" -}}
|
{{- $linkico := "🔗" -}}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<!-- Request ID: {{ .ReqUUID.String }} -->
|
{{ $page.RenderReqId }}
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>{{ getTitle $page.PageType }}</title>
|
<title>{{ getTitle $page.PageType }}</title>
|
||||||
|
|||||||
Reference in New Issue
Block a user