Last modified: 2012-12-30 21:12:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41456, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39456 - Searchmenu-* messages are given $1 HTML-encoded, unable to urlencode it
Searchmenu-* messages are given $1 HTML-encoded, unable to urlencode it
Status: NEW
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
unspecified
All All
: Low minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-17 11:53 UTC by Mormegil
Modified: 2012-12-30 21:12 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mormegil 2012-08-17 11:53:12 UTC
“searchmenu-*” messages (e.g. searchmenu-exists) are given the searched title in $1, so that they display something like “There is a page named "[[:$1]]" on this wiki.” However SpecialSearch::showCreateLink() escapes the search query using wfEscapeWikiText.

This means e.g. quotes are escaped as HTML entities when received in searchmenu-new, and you are unable to use the original query in links (e.g. to search in other namespaces) in the message, like “[{{fullurl:Special:Search|search={{urlencode:$1}}&ns14=1&fulltext=Search&advanced=1}} Search categories]” since the urlencode leads to the HTML-encoded quote in the URL (and OTOH, omitting the urlencode would break queries containing e.g. an ampersand).

See https://commons.wikimedia.org/wiki/MediaWiki_talk:Searchmenu-new#Quotes_get_destroyed

Maybe we could have an alternate parameter $2 containing the original unencoded query?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links