From ca76182b81eef75e79e7eb76f5dd20cc0b18c356 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 27 Oct 2024 01:40:42 +0300 Subject: [PATCH] hicli/html: fix extra ``'s in sanitized HTML --- pkg/hicli/html.go | 2 +- pkg/hicli/sync.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/hicli/html.go b/pkg/hicli/html.go index b6b2b21..10c59bf 100644 --- a/pkg/hicli/html.go +++ b/pkg/hicli/html.go @@ -514,7 +514,7 @@ func sanitizeAndLinkifyHTML(body string) (string, []id.ContentURI, error) { var codeBlock *strings.Builder var codeBlockLanguage string var inlineImages []id.ContentURI - ts := make(tagStack, 2) + ts := make(tagStack, 0, 2) Loop: for { switch tz.Next() { diff --git a/pkg/hicli/sync.go b/pkg/hicli/sync.go index fa8baae..c45fd4e 100644 --- a/pkg/hicli/sync.go +++ b/pkg/hicli/sync.go @@ -407,7 +407,7 @@ func (h *HiClient) calculateLocalContent(ctx context.Context, dbEvt *database.Ev return nil, nil } -const CurrentHTMLSanitizerVersion = 3 +const CurrentHTMLSanitizerVersion = 4 func (h *HiClient) ReprocessExistingEvent(ctx context.Context, evt *database.Event) { if (evt.Type != event.EventMessage.Type && evt.DecryptedType != event.EventMessage.Type) ||