dreamwidth/dw-free — pull request #86 by swaldman3 (2012-09-21 21:10:13+00:00)
Title: Bug 844 : disallow + in tags

This does two things:
a. Causes links to tag pages to use the ?tag= URL form if the tags have a + in them.
b. Prevents + in the names of new or renamed tags.

Posting here for review. Concerns I have at present:
1. I haven't tested this with the importer. I don't *think* it should break it, but if I've got something wrong then there's potential for trouble if the imported journal has tags with +. I'm not sure whether it's possible to test this on a dreamhack, and if so, I have no idea how to do so ;-)

2. Posting by email: If a post-by-email would create a new tag with a + in it, the post goes through but it has no tags on it. No error message is returned by email to reflect this. I'm afraid that figuring out how errors are returned by email is beyond me at present :-(

3. In other circumstances, trying to create a new tag or rename one to include a + gives an error along the lines of "The following tag is invalid: silly+tag". This is rather unhelpful, and may cause confusion if somebody already has a load of tags with + in their account - a user may well think that since they already have + tags, it cannot be the + that is causing the problem!
I can't see an easy way of being more specific, short of adding to that error "Please note that + signs are not allowed in new or renamed tags"... which itself is not ideal because we'd still be giving that error on tags that are invalid for other reasons! What do reviewers think?
I don't think it's viable to have a special error when there's a + (tell me if I'm wrong).
Should we put a note in the generic "invalid tag" message, or just leave it and make sure that an FAQ is updated and that Support are well-briefed for the inevitable confusion?