Page MenuHomePhabricator

Strip some whitespace characters around search terms
Open, MediumPublicFeature

Description

Reproduce:
Copy some text begins with no-break spaces and paste it into the main search box or value selector, such as "<nbsp>Wikipedia"

Excepted:
no-break spaces (and other whitespace characters) before and after search terms are stripped, similar to that in Wikipedia opensearch (which use the opensearch endpoint)

Actual:
You does not got the item for Wikipedia: https://www.wikidata.org/w/api.php?action=wbsearchentities&search=%C2%A0Wikipedia&format=json&errorformat=plaintext&language=en&uselang=en&type=item
This will be inconvenient if you are copying search terms from other websites that contains such whitespace characters, as users may be unaware of the existence of such characters.

Note:
Space characters that are stripped: space, tab, linebreak
Space characters that are not stripped (but should be stripped): en-space, ideographic space

Event Timeline

Aklapper changed the subtype of this task from "Bug Report" to "Feature Request".
Gehel triaged this task as Medium priority.Jan 23 2023, 4:52 PM
Gehel moved this task from needs triage to Wikibase Search on the Discovery-Search board.