Page MenuHomePhabricator

Cannot link to an article with '&' in Name
Closed, InvalidPublic

Description

Author: fabian.zeindl

Description:
When I create the link [[x1 & y2]] to the nonexisting page 'x1 & y2' and click
on it I can edit the page 'x1 & y2'.
But whenever I click 'Save' or try to link to a page 'x1 & y2' that exists, I
always get displayed the page 'x1'. When I link to the existing page 'Data
Engineering & Statistics' i come to the page 'Data Engineering'.

I'm using Mediawiki 1.5b4


Version: 1.5.x
Severity: major
Platform: PC

Details

Reference
bz3010

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:45 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz3010.
bzimport added a subscriber: Unknown Object (MLST).

river wrote:

are you using rewrite rules for your article path?

river wrote:

you need to either:

  1. apply maintenance/apache-ampersand.diff to your Apache sources, recompile, and use

rewrite rules like this:

RewriteMap ampescape int:ampescape 
RewriteRule ^/wiki/(.*)$ /w/index.php?title=${ampescape:$1} [QSA,L]

or 2) you might try redirecting to "/w/index.php/$1" instead of using ?title=, which will
form a URL like "/w/index.php/AT&T", which is not a query-string.

option 2 will only work with mod_php, not CGI/FastCGI PHP.