screenshot
wfEscapeWikiText does not escape enough characters, allowing undesirable formatting through in certain cases.
To reproduce, open the following URL. This is a search for
"TOC OR<CR>;a<CR>ISBN<TAB>978-3-16-148410-0<CR> a".
Expected Result:
The text "Results 1–6 of 6 for " (from message 'showingresultsheader') is followed by "TOC OR ;a ISBN 978-3-16-148410-0 a", with no special formatting or linking beyond the bolding applied by the message text.
Actual Result:
TOC disappears. The first "a" appears on the next line. The ISBN is indented (as a definition in a definition list) and linked to Special:BookSources. The second "a" appears as monospaced text inside a pre element.
Version: 1.22.0
Severity: normal
URL: https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=all&search=%0D;a%0D:ISBN%09978-3-16-148410-0%0D%20a&fulltext=Search
Attached: