List of steps to reproduce (step by step, including full links if applicable):
- Open https://en.wikipedia.org/wiki/Special:Search.
- Copy this (with a space at the end): абвгдеёжзийклмнопрстуфхцчшщъыьэюя (it's the Russian alphabet).
- Paste into the search form as many times as you can.
What happens?:
At the 4th paste, you will bump into a length limit. But it's a wrong one – 129 characters, which is obviously 255 bytes (Cyrillic characters are 2 bytes each).
What should have happened instead?:
The real limit is 300 characters, see T107947 and a 305 character query. Actually, you will be able to reach it if you type in the address bar, not the search bar.
Other information
I noticed mw.widgets.TitleWidget is used there with its 255 byte limit. So perhaps this limit is wrongly inherited by mw.widgets.SearchInputWidget.
Came across this bug when people started renaming long categories because their names don't fit in the search query.