From d69f0d57bca7761d9cc3810973cc06cc357c49fe Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 6 Feb 2017 22:02:21 -0500 Subject: *-pem2html: Correctly render empty cells (made possible by recent changes) --- util/html.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 util/html.go (limited to 'util') diff --git a/util/html.go b/util/html.go new file mode 100644 index 0000000..af2ce60 --- /dev/null +++ b/util/html.go @@ -0,0 +1,14 @@ +package util + +import ( + "html/template" + "strings" +) + +func HTMLCellEscapeString(s string) template.HTML { + html := template.HTMLEscapeString(s) + if strings.TrimSpace(html) == "" { + html = " " + } + return template.HTML(html) +} -- cgit v1.2.3-2-g168b