disable regex for the moment
This commit is contained in:
parent
913c31a9f7
commit
68c164ed5d
1 changed files with 11 additions and 13 deletions
|
@ -1,10 +1,7 @@
|
||||||
package tagsManager
|
package tagsManager
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"regexp"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/lbryio/lbry.go/extras/errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -65,16 +62,17 @@ func SanitizeTags(tags []string, youtubeChannelID string) ([]string, error) {
|
||||||
|
|
||||||
func normalizeTag(t string) (string, error) {
|
func normalizeTag(t string) (string, error) {
|
||||||
t = strings.ToLower(t)
|
t = strings.ToLower(t)
|
||||||
r, err := regexp.Compile("/\\([^\\)]+\\)/g")
|
return t, nil
|
||||||
if err != nil {
|
//r, err := regexp.Compile("/\\([^\\)]+\\)/g")
|
||||||
return "", errors.Err(err)
|
//if err != nil {
|
||||||
}
|
// return "", errors.Err(err)
|
||||||
r2, err := regexp.Compile("/[^\\w-'&]/g")
|
//}
|
||||||
if err != nil {
|
//r2, err := regexp.Compile("/[^\\w-'& \+]/g")
|
||||||
return "", errors.Err(err)
|
//if err != nil {
|
||||||
}
|
// return "", errors.Err(err)
|
||||||
t = r.ReplaceAllString(t, "")
|
//}
|
||||||
return r2.ReplaceAllString(t, ""), nil
|
//t = r.ReplaceAllString(t, "")
|
||||||
|
//return r2.ReplaceAllString(t, ""), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type tagsSanitizer struct {
|
type tagsSanitizer struct {
|
||||||
|
|
Loading…
Reference in a new issue