diff --git a/fun.go b/fun.go index 71d9e03..474cc01 100644 --- a/fun.go +++ b/fun.go @@ -67,6 +67,7 @@ func reverbolate(userid int64, honks []*Honk) { _, h.Oondle = handles(h.Oonker) } zap := make(map[*Donk]bool) + h.Precis = unpucker(h.Precis) h.Noise = unpucker(h.Noise) h.Open = "open" if badword := unsee(zilences, h.Precis, h.Noise); badword != "" { @@ -77,7 +78,7 @@ func reverbolate(userid int64, honks []*Honk) { } else if h.Precis == "unspecified horror" { h.Precis = "" } - h.Precis = unpucker(h.Precis) + h.HTPrecis, _ = filt.String(h.Precis) h.HTML, _ = filt.String(h.Noise) emuxifier := func(e string) string { for _, d := range h.Donks { @@ -90,6 +91,7 @@ func reverbolate(userid int64, honks []*Honk) { } return e } + h.HTPrecis = template.HTML(re_emus.ReplaceAllStringFunc(string(h.HTPrecis), emuxifier)) h.HTML = template.HTML(re_emus.ReplaceAllStringFunc(string(h.HTML), emuxifier)) j := 0 for i := 0; i < len(h.Donks); i++ { diff --git a/honk.go b/honk.go index 4d18a73..9df04f2 100644 --- a/honk.go +++ b/honk.go @@ -55,6 +55,7 @@ type Honk struct { Whofore int64 Replies []*Honk Flags int64 + HTPrecis template.HTML HTML template.HTML Style string Open string diff --git a/views/honk.html b/views/honk.html index 9763c39..2214792 100644 --- a/views/honk.html +++ b/views/honk.html @@ -39,8 +39,8 @@ in reply to: {{ .RID }}

-{{ .Precis }} -

{{ .Precis }} +

{{ .HTPrecis }} +

{{ .HTPrecis }}

{{ .HTML }} {{ range .Donks }} {{ if .Local }}