Here's an odd one, head to Stack Overflow (or any Stack Exchange site that is programming focused) and search for this:

[c#] "public interface IFoobar"

This doesn't seem to happen consistently but so far, it's frequently being changed to:

"[c#] "public interface IFoobar""

That is, double quotes are being added around the search.

If you look at the right of the results, it says:

results found containing
public interface ifoobar "[c#] " ""

tagged with

I haven't done an exhaustive test of all possible combinations but it seems to happen when the search string contains specifically:

  • Quoted text containing somthing in the form:
    (public|protected|private|internal) (class|interface|enum) (<identifier>)
  • anything else preceeding or following it

I've tried a few more combinations and it becomes quoted.

"protected enum Number" NUMBER
"private interface IStuff" [c#]

I can't find a strict pattern to it, it seems to happen only when C# is a potential tag and doesn't affect other C# constructs. (might be worth mentioning that C# is one of my favorited tags) Also, if it doesn't work at first, changing the identifier or any of the other components usually causes it to happen again. It doesn't seem to happen when another non-c# language is tagged. These don't seem to cause it:

[java] "public class Foo"
[c#] "public zzzz Foo"

I've also tried on other sites and it seems to happen only on programming focused sites:

codereview.stackexchange.com (does)
programmers.stackexchange.com (does)
superuser.com (doesn't)
meta.stachexchange.com (doesn't)
gaming.stachexchange.com (doesn't)

I know C# is used in the backend, perhaps something is being overzealous with the sanitization of things that looks like code?

  • Also reported on MSO – rene Mar 21 '16 at 21:12
  • This affects much more than programming related stuff (which I've added to my post, which rene linked). I've up voted you now that I have a MSE account. – Laurel Apr 23 '16 at 14:20

With build 2018.1.8.28296 a change went out, that changes this behavior, so that no additional quoted search is performed if there is at least one double quote present in the query.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .