Page MenuHomePhabricator

articles containing %2C and similar can be created
Closed, InvalidPublic

Description

Author: ahoerstemeier

Description:
Since a few days on recent changes occasionally articles title in which some
characters (e.g. brackets, comma) are replaced by the hex-encoded value of the
character. E.g. instead of "Crud, Neil" the article resides at "Crud%2C Neil" -
and isn't accessible normally as the browser automatically replaces the %2C with
the comma. A move or delete works however. Only observed on en: so far.


Version: unspecified
Severity: normal

Details

Reference
bz413

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:53 PM
bzimport set Reference to bz413.
bzimport added a subscriber: Unknown Object (MLST).

jeluf wrote:

Where do these replaced characters appear? Address line, Recent Changes, New
pages, ... ?

ahoerstemeier wrote:

I shows on new pages, recent changes, as well as in the User contributions list.
The last one I found at New pages is [[Amon Amarth %28band%29]] by
[[User:Grappo6x6]]. Notice that the two histories are different:

http://en.wikipedia.org/w/wiki.phtml?title=Amon_Amarth_%28band%29&action=history
http://en.wikipedia.org/w/wiki.phtml?title=Amon_Amarth_%2528band%2529&action=history

ahoerstemeier wrote:

The culprit is the page which shows when you navigate to a non-existing article.
The link "dit this page" below the text "Wikipedia does not have an article with
this name" masks the brackets, comma etc. The "edit this page" link on the top
of the page however directs to the correct article.

I found a (possible) solution to this problem:

In Article.php:

I have changed all accesses to the database usign $title or
$this-mTitle->getDBKey() with wfStrncode(*) of this expression.

It appears to fix this problem.

Tom Gries 10.09.2004

I reported to wikitech-l on 09.09.2004 22:02

Dear Brion,
in my opinion, there is problem in the character conversion of
pagetitles which appears when a pagename contains an apostrophe ( ' ).

I have set up a testpage having an apostroph such as
User:Nyxos/testpage_and_users'_guide . When you put it into your
watchlist or visit recent changes view, the apostroph is (still) coded
as %27 instead of being re-rendered as apostrophe.

W.r.t. recent changes listing and/or watchlist using the same modules:
Live example page:

linktext =
http://en.wikipedia.org/wiki/User:Nyxos/testpage_and_users%27_guide
link underneath the linktext is coded as =
http://en.wikipedia.org/wiki/User:Nyxos/testpage_and_users%2527_guide

When you follow the link, you get the message, that the page does
not exist - which is not true !
--->
when you now follow the "edit this page", you see the correct link
http://en.wikipedia.org/wiki/User:Nyxos/testpage_and_users27_guide
and the page text is present again.

I guess, it has to do with a mix-up of accessing the MySQL databases
sometimes with namespace:pagetitle, sometimes with page_id() and also
the MySQL statements.

Tom aka Nyxos

This was a site-specific user error: someone replaced the {{PAGENAME}} interpolation with the escaped {{PAGENAMEE}} in the [[MediaWiki:
Noarticletext]] message. Since it was used inside a {{localurl:}} link it was already being escaped, and this caused double-escaping of the link. I've
fixed the message and the links are now correct.