How did a special-character tag get into the system?

by mmyers   Last Updated June 12, 2019 07:24 AM - source

Observe this question (which will be shortly deleted but is being kept for observation).

It has a tag of [#]. The sidebar says [#] x 2, but clicking on it doesn't work too well.

So now I'm left to wonder if there is, in fact, another # question. But should this even be allowed in the first place? I can't think of any legitimate tags that don't include at least one letter or number (404 being an example of a legitimate tag with no letters).

Tagging this question as #, ., &, and -.

Edit: Those tags were stripped out. Which now turns this into a question of, how did that get there?



Answers 3


I was able to add the [#] tag back in by encasing it in double quotes - "#". If you edit this question the quotes are not present in the tags field, however the hash / pound sign is still there.

I also tried to add the other special characters you mention. With all 4 only the dot (.) tag remained. This is what I entered for tags:

bug "#" "." "&" "-"
squillman
squillman
July 22, 2010 22:17 PM

I can't think of any legitimate tags that don't include at least one letter or number (404 being an example of a legitimate tag with no letters).

I disagree.

It would be awesome to be able to tag things like operators consisting only of symbols ?: >>>= >@> and so on. Especially as Google and most other search engines don't seem to be able to index these tokens. A lot of questions about these operators get repeated over and over, often with a line "I've tried Googling but couldn't find anything".

This feature would actually make me want to use SO's search.

Mark Byers
Mark Byers
July 22, 2010 23:14 PM

This is my bad -- bug in the sanitization routine. There is a new unrolled loop one now.

The rules for tag strings are somewhat complex:

  • max of 35 chars
  • valid tag chars are a-z 0-9 # + - .
  • we automatically convert _ to - wherever we see it
  • tags can't start with - or #
  • tags can't end with - or .
  • + is only valid at the end of a tag
  • wildcard, if allowed, is * (this is for client side use only; server wildcard is ~)
Jeff Atwood
Jeff Atwood
July 29, 2010 03:44 AM

Related Questions



Favorite Tags Feed

Updated March 02, 2016 01:10 AM

Automatically determine tags while writing a question

Updated February 23, 2017 01:24 AM