Page MenuHomePhabricator

insource and intitle regular expression search doesn't allow final escaped slash
Open, MediumPublicBUG REPORT

Description

Steps to Reproduce:
Submit the query insource:/\// or intitle:/\// in CirrusSearch.

Practical example link with narrowed search domain: Search results for “: slash insource:/\//” (English Wikipedia).

Actual Results:
Error message: An error has occurred while searching: Regular expression syntax error at unknown: unknown. Apparently there is some kind of parsing error.

Expected Results:
Should search for pages containing / or titles in the given namespaces containing /. The query also fails if more valid regular expression characters are added before \/: insource:/word\// or intitle:/word\//.

Search succeeds when \/ is not the last thing in the regex: insource:/\/./ or intitle:/\/./.

Again, example link for English Wikipedia: Search results for “: slash insource:/\/./”


This is probably a separate issue, but insource:// and intitle://, and insource:/// and insource:////, etc., have an odd error: An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later. I would've expected something like "You can't search for an empty regular expression" and "Invalid syntax: / found after insource:// syntax, expected space character or end of query".