Page MenuHomePhabricator

Special:Search produces bogus URLs containing spaces
Closed, InvalidPublic

Description

Author: qleah

Description:
For example, when searching for "ant lion", Special:Search produces the following HTML:

<p class='subtitle'>You searched for "<a href="/wiki/ant lion">ant lion</a>" <a href="/wiki/Special:Allpages/ant lion">[Index]</a></p>

The server does not recognize URLs containing spaces; in browsers that do not replace spaces with %20, these links will fail.


Version: unspecified
Severity: major
URL: http://en.wikipedia.org/wiki/ant lion

Details

Reference
bz2048

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 8:29 PM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz2048.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.May 2 2005, 1:17 PM

wegge wrote:

(In reply to comment #0)

For example, when searching for "ant lion", Special:Search produces the

following HTML:

<p class='subtitle'>You searched for "<a href="/wiki/ant lion">ant lion</a>"

<a href="/wiki/Special:Allpages/ant lion">[Index]</a></p>

The server does not recognize URLs containing spaces; in browsers that do not

replace spaces with %20, these links will fail.

This is not a MediaWiki bug, but rather a configuration error. The text on the
results page are inserted from [[MediaWiki:Searchquery]], where $1 is replaced
with the search term. If a valid link to a page named after the search term is
desired, it should be put in [[MediaWiki:Nogomatch]], where $1 is replaced with
a suitable URL for the term, and $2 is replaced with the search term in an
HTML-escaped form.

Please note that this description is valid for MediaWiki 1.4 only. In the
current development version, $1 in MediaWiki:Nogomatch is replaced with :<search
term>, and the whole text is then parsed as wiki marup.