From e2f0ba61ac0dbe4f05fc2573af3f717725aa7129 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 29 Oct 2024 14:38:23 +0200 Subject: [PATCH] hicli/html: open mxc urls in new tab --- pkg/hicli/html.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/hicli/html.go b/pkg/hicli/html.go index 10c59bf..d7a890b 100644 --- a/pkg/hicli/html.go +++ b/pkg/hicli/html.go @@ -223,6 +223,7 @@ func writeURL(w *strings.Builder, addr []byte) { } w.WriteString("') @@ -405,6 +406,7 @@ func writeA(w *strings.Builder, attr []html.Attribute) (mxc id.ContentURI) { return } writeAttribute(w, "class", "hicli-mxc-url") + writeAttribute(w, "target", "_blank") writeAttribute(w, "data-mxc", mxc.String()) href = fmt.Sprintf(HTMLSanitizerImgSrcTemplate, mxc.Homeserver, mxc.FileID) default: