# Inconsistent processing of search requests

Linking through the multiple-comparisons tab gives a page listing 47 tagged questions (as of this moment). The textbox in the upper right corner reads "[multiple-comparisons]". Typing in another search term, such as "[multiple-comparisons] correlation" and pressing Enter restricts the search, in this case returning just 8 results. The URL for these results is https://stats.stackexchange.com/search?q=[multiple-comparisons]+correlation.

However, using the same URL for a link within a comment returns 390 search results!!

(If you link through the preceding line you will see 8 results. If you link through the first comment below you will see all 390.)

• Here's a test http://stats.stackexchange.com/search?q=[multiple-comparisons]+correlation
– whuber Mod
Apr 19 '11 at 16:45
• Here's another test. http://stats.stackexchange.com/search?q=%5Bmultiple-comparisons%5D%20correlation Apr 19 '11 at 21:53

## 1 Answer

Hmm.

I get

https://stats.stackexchange.com/search?q=%5Bmultiple-comparisons%5D%20correlation

8 results.

There are

https://stats.stackexchange.com/questions/tagged/multiple-comparisons

47 questions with the tag, so that doesn't seem unreasonable.

• it's quite reasonable. What's unreasonable is that the very same URL gives dramatically different results depending on whether it's used in a question/reply/Web browser or in a comment. When you link through the test comment I provided, how many results appear for you?
– whuber Mod
Apr 19 '11 at 20:23
• oh you need to encode it. See the above version -- brackets have to be escaped. Apr 19 '11 at 21:53
• Thanks Jeff. That resolves it.
– whuber Mod
Apr 19 '11 at 23:19
• Out of curiosity, why is it necessary to escape a square bracket when the quotation symbols are parentheses?
– whuber Mod
Apr 21 '11 at 3:20
• Seems like an obvious bug in the comment-processing code. Why wouldn't you also interpret brackets correctly for strings starting with http:// and no white space in between. URL escaping is not likely to be well-known to users on specialized (non-SO) sites in the SE community. Apr 22 '11 at 18:57