diff --git a/pkg/hicli/html.go b/pkg/hicli/html.go index b0b7df1..fb66ff0 100644 --- a/pkg/hicli/html.go +++ b/pkg/hicli/html.go @@ -469,9 +469,13 @@ Loop: tagName, _ := tz.TagName() tag := atom.Lookup(tagName) if tagIsAllowed(tag) && ts.pop(tag) { - built.WriteString("') + if tag == atom.Font { + built.WriteString("") + } else { + built.WriteString("') + } } case html.TextToken: if ts.contains(atom.Pre, atom.Code, atom.A) { diff --git a/pkg/hicli/sync.go b/pkg/hicli/sync.go index 2768dc0..f8429a9 100644 --- a/pkg/hicli/sync.go +++ b/pkg/hicli/sync.go @@ -356,7 +356,7 @@ func (h *HiClient) calculateLocalContent(ctx context.Context, dbEvt *database.Ev return nil } -const CurrentHTMLSanitizerVersion = 1 +const CurrentHTMLSanitizerVersion = 2 func (h *HiClient) ReprocessExistingEvent(ctx context.Context, evt *database.Event) { if evt.Type != event.EventMessage.Type || evt.LocalContent == nil || evt.LocalContent.HTMLVersion >= CurrentHTMLSanitizerVersion {