diff options
Diffstat (limited to 'tls-pem2html.go')
-rw-r--r-- | tls-pem2html.go | 5 |
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> |