Steps to replicate the issue (include links if applicable):
- Go to https://de.wikipedia.org
- Enter en:Wikipedia#History in the search box.
What happens?:
It goes to https://en.wikipedia.org/wiki/Wikipedia
The same happens if you start at https://commons.wikimedia.org and search w:Wikipedia#History
What should have happened instead?:
It should remember the anchor and go to https://en.wikipedia.org/wiki/Wikipedia#History
A wikilink [[:en:Wikipedia#History]] goes to the section as expected.
If you enter Wikipedia#History in the search box at enwiki itself then the anchor is remembered and it goes to the section as expected.
It's unexpected that the behaviour is different in searches with a prefix.