multiple tags as string
SwissalpS opened this issue · comments
I'm a bit fuzzy on the discussion going into the tag support. Reading the code at:
Line 207 in 6c66a2f
I would have expected the string to be passed as is to sanitize function so user can send a string with multiple tags.
I probably missed the part of the discussion where this was voted against for whatever reason. Just checking here.
It wasn't really discussed, but since it's msg.tag
(singular), then it makes sense to only accept one tag. However, by that logic you should be able to send a string with multiple tags using msg.tags
.
I would actually drop the singular msg.tag
. Now a user can set a singular tag containing commas but when meta is read, they will multiple tags.
This isn't going to crash anything, it can only lead to unexpected behaviour.
Passing "tag1,tag2, tag3, tag4" as msg.tag
could lead to tag3 and tag4 having leading space and not matching.
Each tag gets commas and whitespace removed here:
Line 17 in ce263da
So passing "tag1,tag2, tag3, tag4" as msg.tag
will result in one tag "tag1tag2tag3tag4", and passing it as msg.tags
will result it each tag being separated.
unexpected behaviour
Just need to update the documentation :)