Tag name with single quote causes server error

Using the discourse-tagging plugin version 0.2, if someone tries to create a tag that has a single quote ( ’ ) in the name (eg, “drag’n”) they get a “500 Internal Server Error”.

Not a high priority as it’s easy to work around, but a more helpful error message would be great.

Thanks!

2 Likes

I don’t think we should allow tags with quotes in them @neil.

4 Likes

Do we check for oddball / problem chars in tags now @neil?

Hmm, we do filter out some but are still allowing single quotes. Also other characters that shouldn’t be allowed like "=! and probably more. I’m not sure why the tag plugin ever had its own filter TAGS_FILTER_REGEXP for this.

2 Likes

I fixed this today. New tags will have more characters stripped from them, more in line with rules for topic and category slugs. Existing tags with weird characters that happen to work won’t be affected.

5 Likes