Lucas_Werkmeister_WMDE added a comment.
While this issue arises from the on-wiki-overridden interface message (and
therefore arguably isn’t the responsibility of the Wikidata development team),
I think it requires a fix at the software level. Specifically, the
Special:Search page wikitext-escapes the search term before sending it to the
interface message:
name=SpecialSearch.php
// If we have no results and have not already displayed an error message
if ( $num === 0 && !$hasSearchErrors ) {
$out->wrapWikiMsg( "<p class=\"mw-search-nonefound\">\n$1</p>", [
$hasOtherResults ? 'search-nonefound-thiswiki' :
'search-nonefound',
wfEscapeWikiText( $term )
] );
}
I’m not aware of any way for the interface message to undo this escaping, so
that it can put the original search term in the URL. My suggestion is to the
unescaped search term as a second parameter to the message: it would be unused
by default, but the Wikidata version of the message could use $2 to build the
link (while still displaying the original, escaped $1).
TASK DETAIL
https://phabricator.wikimedia.org/T263258
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: matej_suchanek, Ayack, Lucas_Werkmeister_WMDE, Aklapper, Akuckartz,
darthmon_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer,
_jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs