Page MenuHomePhabricator

WikiEditor articlePathRegex does not handle query string parameters
Open, MediumPublic

Description

This problem is dependent on solving T33499, otherwise you can't see the behavior.

  1. In the insert-link dialog of WikiEditor, enter a http link to a wiki page, plus a query string. For example, if your wiki is mywiki.com, enter:

http://mywiki.com/wiki/MyPage?action=purge

The editor warns you:

The URL you specified looks like it was intended as a link to another wiki page. Do you want to make it an internal link?

You click "Internal Link", and the link changes to:

MyPage?action=purge

which then inserts (wrongly):

[[MyPage?action=purge]]

Ideally it should get turned into:

[{{fullurl:MyPage|action=purge}} link text]

WikiEditor fails similarly if you enter the "index.php?title=" form of the title:

http://mywiki.com/w/index.php?title=MyPage

This does not get recognized as an internal link to the local wiki. Ideally it would get turned into:

[[MyPage]]


Version: unspecified
Severity: normal

Details

Reference
bz31500