allow "=" in tag value.

fixes https://github.com/fiatjaf/nak/issues/40
This commit is contained in:
fiatjaf 2024-10-27 11:01:29 -03:00
parent ea53eca74f
commit 464766a836

2
req.go
View File

@ -231,7 +231,7 @@ func applyFlagsToFilter(c *cli.Command, filter *nostr.Filter) error {
} }
tags := make([][]string, 0, 5) tags := make([][]string, 0, 5)
for _, tagFlag := range c.StringSlice("tag") { for _, tagFlag := range c.StringSlice("tag") {
spl := strings.Split(tagFlag, "=") spl := strings.SplitN(tagFlag, "=", 2)
if len(spl) == 2 && len(spl[0]) == 1 { if len(spl) == 2 && len(spl[0]) == 1 {
tags = append(tags, spl) tags = append(tags, spl)
} else { } else {