~netlandish/links-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH links] Allow pipe characters in tags.

Details
Message ID
<20250529185557.2452-1-peter@netlandish.com>
Sender timestamp
1748523355
DKIM signature
missing
Download raw message
Patch: +4 -0
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
Details
Message ID
<DA8VL5TK4HOZ.2JAK2U30PTTIJ@netlandish.com>
In-Reply-To
<20250529185557.2452-1-peter@netlandish.com> (view parent)
Sender timestamp
1748523726
DKIM signature
missing
Download raw message
Applied.

To git@git.code.netlandish.com:~netlandish/links
   2693ad9..dbf83fe  master -> master
Reply to thread Export thread (mbox)