replace emoji after html filtering
This commit is contained in:
parent
2a0be57a2e
commit
6b2bf3b387
11
fun.go
11
fun.go
|
@ -188,6 +188,9 @@ func filterchonk(ch *Chonk) {
|
||||||
local = true
|
local = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ch.HTML, _ = htf.String(noise)
|
||||||
|
noise = string(ch.HTML)
|
||||||
|
|
||||||
zap := make(map[string]bool)
|
zap := make(map[string]bool)
|
||||||
emuxifier := func(e string) string {
|
emuxifier := func(e string) string {
|
||||||
for _, d := range ch.Donks {
|
for _, d := range ch.Donks {
|
||||||
|
@ -217,12 +220,10 @@ func filterchonk(ch *Chonk) {
|
||||||
}
|
}
|
||||||
ch.Donks = ch.Donks[:j]
|
ch.Donks = ch.Donks[:j]
|
||||||
|
|
||||||
ch.HTML, _ = htf.String(noise)
|
if strings.HasPrefix(noise, "<p>") {
|
||||||
n := string(ch.HTML)
|
noise = noise[3:]
|
||||||
|
|
||||||
if strings.HasPrefix(n, "<p>") {
|
|
||||||
ch.HTML = template.HTML(n[3:])
|
|
||||||
}
|
}
|
||||||
|
ch.HTML = template.HTML(noise)
|
||||||
if short := shortname(ch.UserID, ch.Who); short != "" {
|
if short := shortname(ch.UserID, ch.Who); short != "" {
|
||||||
ch.Handle = short
|
ch.Handle = short
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue