aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/util.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/util.go b/util/util.go
index 7da4671..a56e871 100644
--- a/util/util.go
+++ b/util/util.go
@@ -238,3 +238,10 @@ func HashBytes(media []byte) string {
h.Write(media)
return hex.EncodeToString(h.Sum(nil))
}
+
+func EscapeString(text string) string {
+ // TODO: not enough
+
+ text = strings.Replace(text, "<", "&lt;", -1)
+ return text
+}