break down and make mentions look like other mentions
This commit is contained in:
parent
f5709a9e84
commit
723ac49a0c
5
fun.go
5
fun.go
|
@ -185,8 +185,9 @@ func obfusbreak(s string) string {
|
|||
if where == "" {
|
||||
return m
|
||||
}
|
||||
return fmt.Sprintf(`<a class="mention" href="%s">%s</a>`, html.EscapeString(where),
|
||||
html.EscapeString(m))
|
||||
who := m[0:1 + strings.IndexByte(m[1:], '@')]
|
||||
return fmt.Sprintf(`<span class="h-card"><a class="u-url mention" href="%s">%s</a></span>`,
|
||||
html.EscapeString(where), html.EscapeString(who))
|
||||
})
|
||||
return s
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue