mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Parse links that contain non-ascii characters (#2762)
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"codeberg.org/gruf/go-byteutil"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/log"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/regexes"
|
||||
"github.com/yuin/goldmark"
|
||||
"github.com/yuin/goldmark/extension"
|
||||
"github.com/yuin/goldmark/renderer/html"
|
||||
@@ -61,7 +62,10 @@ func (f *Formatter) FromMarkdown(
|
||||
false, // emojiOnly = false.
|
||||
result,
|
||||
},
|
||||
extension.Linkify, // Turns URLs into links.
|
||||
// Turns URLs into links.
|
||||
extension.NewLinkify(
|
||||
extension.WithLinkifyURLRegexp(regexes.LinkScheme),
|
||||
),
|
||||
extension.Strikethrough,
|
||||
),
|
||||
)
|
||||
|
Reference in New Issue
Block a user