emuxify subjects too

This commit is contained in:
Ted Unangst 2019-09-18 15:08:50 -04:00
parent 1b945c5cac
commit 07bf86afde
3 changed files with 6 additions and 3 deletions

4
fun.go
View File

@ -67,6 +67,7 @@ func reverbolate(userid int64, honks []*Honk) {
_, h.Oondle = handles(h.Oonker) _, h.Oondle = handles(h.Oonker)
} }
zap := make(map[*Donk]bool) zap := make(map[*Donk]bool)
h.Precis = unpucker(h.Precis)
h.Noise = unpucker(h.Noise) h.Noise = unpucker(h.Noise)
h.Open = "open" h.Open = "open"
if badword := unsee(zilences, h.Precis, h.Noise); badword != "" { 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" { } else if h.Precis == "unspecified horror" {
h.Precis = "" h.Precis = ""
} }
h.Precis = unpucker(h.Precis) h.HTPrecis, _ = filt.String(h.Precis)
h.HTML, _ = filt.String(h.Noise) h.HTML, _ = filt.String(h.Noise)
emuxifier := func(e string) string { emuxifier := func(e string) string {
for _, d := range h.Donks { for _, d := range h.Donks {
@ -90,6 +91,7 @@ func reverbolate(userid int64, honks []*Honk) {
} }
return e return e
} }
h.HTPrecis = template.HTML(re_emus.ReplaceAllStringFunc(string(h.HTPrecis), emuxifier))
h.HTML = template.HTML(re_emus.ReplaceAllStringFunc(string(h.HTML), emuxifier)) h.HTML = template.HTML(re_emus.ReplaceAllStringFunc(string(h.HTML), emuxifier))
j := 0 j := 0
for i := 0; i < len(h.Donks); i++ { for i := 0; i < len(h.Donks); i++ {

View File

@ -55,6 +55,7 @@ type Honk struct {
Whofore int64 Whofore int64
Replies []*Honk Replies []*Honk
Flags int64 Flags int64
HTPrecis template.HTML
HTML template.HTML HTML template.HTML
Style string Style string
Open string Open string

View File

@ -39,8 +39,8 @@ in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
</header> </header>
<p> <p>
<details class="noise" {{ .Open }} > <details class="noise" {{ .Open }} >
<summary>{{ .Precis }}</summary> <summary>{{ .HTPrecis }}</summary>
<p>{{ .Precis }} <p>{{ .HTPrecis }}
<p>{{ .HTML }} <p>{{ .HTML }}
{{ range .Donks }} {{ range .Donks }}
{{ if .Local }} {{ if .Local }}