Tag name with single quote causes server error


(Mark Hiner) #1

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.


(Jeff Atwood) #2

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

(Jeff Atwood) #3

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

(Neil Lalonde) #4

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.

(Neil Lalonde) #5

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.