Subject: [PATCH links] Allow pipe characters in tags.

From: Peter Sanchez <[email-masked]>
Date: Thu, 29 May 2025 12:55:55 -0600

Don't try to save tags longer than 50 chars.

Changelog-fixed: Issue saving tags longer than 50 chars (not allowed)
Changelog-updated: Allow tags with pipe symbols
---
 helpers.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/helpers.go b/helpers.go
index 9ce16dc..7d30e3f 100644
--- a/helpers.go
+++ b/helpers.go
@@ -747,6 +747,9 @@ func ProcessTags(ctx context.Context, tags []string) ([]int, error) {
 		tag := strings.TrimSpace(tag)
 		if tag != "" {
 			slug := Slugify(tag)
+			if len(tag) > 50 || len(slug) > 50 {
+				continue
+			}
 			Tag := &models.Tag{
 				Name: tag,
 				Slug: slug,
@@ -869,6 +872,7 @@ func ParseSearch(s string) string {
 		if len(word) > 0 {
 			word = strings.TrimSpace(word)
 			word = strings.Replace(word, ":", "\\:", -1)
+			word = strings.Replace(word, "|", "\\|", -1)
 			if !strings.HasPrefix(word, "-") {
 				word = word + ":*"
 			}
-- 
2.47.2