From 68c164ed5d0e1a07571917350183d5a5f55bd230 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Fri, 31 May 2019 23:25:39 +0200 Subject: [PATCH] disable regex for the moment --- tagsManager/tags_mapping.go | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tagsManager/tags_mapping.go b/tagsManager/tags_mapping.go index f05b0a9..871dd4a 100644 --- a/tagsManager/tags_mapping.go +++ b/tagsManager/tags_mapping.go @@ -1,10 +1,7 @@ package tagsManager import ( - "regexp" "strings" - - "github.com/lbryio/lbry.go/extras/errors" ) const ( @@ -65,16 +62,17 @@ func SanitizeTags(tags []string, youtubeChannelID string) ([]string, error) { func normalizeTag(t string) (string, error) { t = strings.ToLower(t) - r, err := regexp.Compile("/\\([^\\)]+\\)/g") - if err != nil { - return "", errors.Err(err) - } - r2, err := regexp.Compile("/[^\\w-'&]/g") - if err != nil { - return "", errors.Err(err) - } - t = r.ReplaceAllString(t, "") - return r2.ReplaceAllString(t, ""), nil + return t, nil + //r, err := regexp.Compile("/\\([^\\)]+\\)/g") + //if err != nil { + // return "", errors.Err(err) + //} + //r2, err := regexp.Compile("/[^\\w-'& \+]/g") + //if err != nil { + // return "", errors.Err(err) + //} + //t = r.ReplaceAllString(t, "") + //return r2.ReplaceAllString(t, ""), nil } type tagsSanitizer struct {