When filtering questions by combining tags invalid tags can be created. This seems to occur occasionally when the tags end with a '+'.
Steps To Reproduce
- Add 'com+' as an interesting tag
- Click on the newly created tag to filter the questions
- Click on a related tag (e.g. 'wcf')
When these steps are done, instead of seeing two tags 'com+' and 'wcf' the tags are concatenated together (separated with a + sign). Obviously no questions are shown since 'com++wcf' is not an actual tag.
The URL in the browser is: http://stackoverflow.com/questions/tagged/com%2b+wcf
Another example would be to select the tag 'mts' combined with the tag 'com+' this results in the tags 'mts' 'com' ' '. The URL in the browser is http://stackoverflow.com/questions/tagged/mts+com%2b
This does not happen for all tags with a '+' in them -- c++ seems to behave properly.
The issue seems to occur when the tag contains a + sign and the tags in browser URL are separated with a '+'. This doesn't seem to be a consistent behavior when combining tags since some tags are combined together by using a %20 in the browser URL (instead of a +).
If this is not an issue, can someone please explain the following HTML source.
For the tag com+, which does not work properly, the following is the HTML that is generated by StackOverflow to filter by another tag:
<a href="/questions/tagged/com%2b+.net" class="post-tag" title="show questions tagged 'com+ .net'" rel="tag">.net</a><span class="item-multiplier">× 25</span><br>
However, for the tag c++, which does work properly, the following is the HTML that is generated by StackOverflow to filter by another tag:
<a href="/questions/tagged/c%2b%2b%20.net" class="post-tag" title="show questions tagged 'c++ .net'" rel="tag">.net</a><span class="item-multiplier">× 255</span><br>
Notice that in the non-working version the tags are separated with a + but in the working case the tags are separated with %20. If the non-working tag simply had a %20 instead of a + then it would work fine.
It seems to me that the URL encoding/rewriting is not working properly when generating the links.