summaryrefslogtreecommitdiff
path: root/tls-pem2html.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-06 22:02:21 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-06 22:02:21 -0500
commitd69f0d57bca7761d9cc3810973cc06cc357c49fe (patch)
tree4a89ba676365210127155b49d520af8b01694fc9 /tls-pem2html.go
parente2b6ec92921a2d43f77015f0e75c362a03430e76 (diff)
*-pem2html: Correctly render empty cells (made possible by recent changes)
Diffstat (limited to 'tls-pem2html.go')
-rw-r--r--tls-pem2html.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/tls-pem2html.go b/tls-pem2html.go
index d12504b..bc14f9a 100644
--- a/tls-pem2html.go
+++ b/tls-pem2html.go
@@ -35,6 +35,7 @@ var tmpl = template.Must(template.New("pem2html").
"date": util.Date2HTML,
"datetime": util.DateTime2HTML,
"colorDatetime": util.DateTime2ColorHTML,
+ "htmlcell": util.HTMLCellEscapeString,
}).Parse(`<table class=sortable>
<caption>
<p>Live Certs (Updated {{.now | colorDatetime}})</p>
@@ -49,8 +50,8 @@ var tmpl = template.Must(template.New("pem2html").
<tr class="{{$cert.Class}}">
<td style="background-color: {{$cert.X509.NotBefore | green}}"><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.NotBefore | date}}</a></td>
<td style="background-color: {{$cert.X509.NotAfter | red }}"><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.NotAfter | date}}</a></td>
- <td><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.Subject.CommonName | html}}</a></td>
- <td><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.Socket | html}}</a></td>
+ <td><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.Subject.CommonName | htmlcell}}</a></td>
+ <td><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.Socket | htmlcell}}</a></td>
</tr>
{{end}}
</table>