mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 11:32:25 -05:00
[bugfix] Parse links that contain non-ascii characters (#2762)
This commit is contained in:
parent
e6e696ae22
commit
0362d49da0
3 changed files with 17 additions and 2 deletions
|
|
@ -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/parser"
|
||||
|
|
@ -158,7 +159,10 @@ func (f *Formatter) fromPlain(
|
|||
emojiOnly,
|
||||
result,
|
||||
},
|
||||
extension.Linkify, // Turns URLs into links.
|
||||
// Turns URLs into links.
|
||||
extension.NewLinkify(
|
||||
extension.WithLinkifyURLRegexp(regexes.LinkScheme),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue