From 4c4bc904608e6b610c8403db699fa14e80074749 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:24:48 -0700 Subject: [PATCH] fix(deps): update module mvdan.cc/xurls to v2 (#3815) * fix(deps): update module mvdan.cc/xurls to v2 * mvdan/xurls 2.x bump fixes (#3823) * Bump xurls import to v2 * Change Strict to function calls, v2.0.0 change * Add go.sum entry for xurls/v2 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: mahmed2000 --- core/chat/events/events.go | 4 ++-- go.mod | 2 +- go.sum | 1 + utils/utils.go | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/chat/events/events.go b/core/chat/events/events.go index ffb65cf27..030f99e96 100644 --- a/core/chat/events/events.go +++ b/core/chat/events/events.go @@ -17,7 +17,7 @@ import ( "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/renderer/html" "github.com/yuin/goldmark/util" - "mvdan.cc/xurls" + "mvdan.cc/xurls/v2" "github.com/owncast/owncast/core/data" "github.com/owncast/owncast/models" @@ -220,7 +220,7 @@ func RenderMarkdown(raw string) string { []byte("https:"), }), extension.WithLinkifyURLRegexp( - xurls.Strict, + xurls.Strict(), ), ), emoji.New( diff --git a/go.mod b/go.mod index 09e7cfef2..d934ea502 100644 --- a/go.mod +++ b/go.mod @@ -87,7 +87,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/yuin/goldmark-emoji v1.0.3 gopkg.in/evanphx/json-patch.v5 v5.9.0 - mvdan.cc/xurls v1.1.0 + mvdan.cc/xurls/v2 v2.5.0 mvdan.cc/xurls/v2 v2.5.0 ) diff --git a/go.sum b/go.sum index 4154e3dde..191079a65 100644 --- a/go.sum +++ b/go.sum @@ -274,4 +274,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= mvdan.cc/xurls v1.1.0 h1:kj0j2lonKseISJCiq1Tfk+iTv65dDGCl0rTbanXJGGc= mvdan.cc/xurls v1.1.0/go.mod h1:TNWuhvo+IqbUCmtUIb/3LJSQdrzel8loVpgFm0HikbI= +mvdan.cc/xurls/v2 v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8= mvdan.cc/xurls/v2 v2.5.0/go.mod h1:yQgaGQ1rFtJUzkmKiHYSSfuQxqfYmd//X6PxvholpeE= diff --git a/utils/utils.go b/utils/utils.go index 2a51c367a..64d9566f9 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -21,7 +21,7 @@ import ( "github.com/yuin/goldmark" "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/renderer/html" - "mvdan.cc/xurls" + "mvdan.cc/xurls/v2" ) // DoesFileExists checks if the file exists. @@ -162,7 +162,7 @@ func RenderSimpleMarkdown(raw string) string { []byte("https:"), }), extension.WithLinkifyURLRegexp( - xurls.Strict, + xurls.Strict(), ), ), ), @@ -191,7 +191,7 @@ func RenderPageContentMarkdown(raw string) string { []byte("https:"), }), extension.WithLinkifyURLRegexp( - xurls.Strict, + xurls.Strict(), ), ), ),