Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix % encoded URLs breaking with `TrackLink`. Closes #2947.

Kailash Nadhc60ea79582ec
diff --git a/models/common.go b/models/common.go
index 83bfc7d8..7d060b52 100644
--- a/models/common.go
+++ b/models/common.go
@@ -55,7 +55,7 @@ var regTplFuncs = []regTplFunc{
// The regex matches all characters that may occur in an URL
// (see "2. Characters" in RFC3986: https://www.ietf.org/rfc/rfc3986.txt)
{
- regExp: regexp.MustCompile(`(https?://[\p{L}\p{N}_\-\.~!#$&'()*+,/:;=?@\[\]]*)@TrackLink`),
+ regExp: regexp.MustCompile(`(https?://[\p{L}\p{N}_\-\.~!#$&'()*+,/:;=?@\[\]%]*)@TrackLink`),
replace: `{{ TrackLink "$1" . }}`,
},