From 3c1f5a701982383d57a4e14add182a2ce6f5c18d Mon Sep 17 00:00:00 2001 From: Felix Hanley Date: Mon, 19 Jun 2017 12:39:36 +1000 Subject: Require character class tags to have at least 3 characters --- http.go | 2 +- tag.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/http.go b/http.go index 9f3e673..c950f0a 100644 --- a/http.go +++ b/http.go @@ -233,7 +233,7 @@ var search = function (term, page) { ].join('') }).join('') var post = [ - '

' + '

', (data.page > 1) ? ' ' : '', (data.torrents.length === data.page_size) ? '' : '', '

'].join('') diff --git a/tag.go b/tag.go index 4191962..49859b7 100644 --- a/tag.go +++ b/tag.go @@ -43,7 +43,8 @@ func initTagRegexps() { continue } className := strings.ToLower(cc) - tagREs[className] = regexp.MustCompile(fmt.Sprintf(`(?i)\p{%s}`, cc)) + // Test for 3 or more characters per character class + tagREs[className] = regexp.MustCompile(fmt.Sprintf(`(?i)\p{%s}{3,}`, cc)) } // Merge user tags for tag, re := range Config.Tags { -- cgit v1.2.3