Page MenuHomePhabricator

single quote in category name and other links tables are broken
Closed, ResolvedPublic

Description

Author: luc.vanoostenryck

Description:
Since v1.4, adding in an article a category with a name containing a single
quote is broken.

the article is not added to the given category but with to a category name in
which each single quotes (%27) are preceded by a backslash (%5C%27).

Exemple:

[Test cat] is not added to
http://fr.wikipedia.org/wiki/Cat%C3%A9gorie:Abc_l%27edf
but to
http://fr.wikipedia.org/wiki/Cat%C3%A9gorie:Abc_l%5C%27edf


Version: 1.4.x
Severity: major

Details

Reference
bz1201

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 8:01 PM
bzimport set Reference to bz1201.
bzimport added a subscriber: Unknown Object (MLST).

luc.vanoostenryck wrote:

The same problem affect the links table.

revo68200 wrote:

The problem is not only when creating an article but occurs when modifying an
article too.

zigger wrote:

Temporary hack for LinksUpdate.php REL1_4

The category title seems to be incorrectly double-strencoded when written to
the columns categorylinks.cl_to and searchindex.si_text, but is only strencoded
once for writes to cur.cur_text, old.old_text and cur.cur_title. When
CategoryPage.php looks for articles, the category title is only strencoded
once.

The attachment only fixes writes to categorylinks.cl_to.

Attached:

zigger wrote:

*** Bug 1261 has been marked as a duplicate of this bug. ***

zigger wrote:

Probably related to bug 1297

  • Bug 1297 has been marked as a duplicate of this bug. ***

Large number of related problems introduced by a misunderstanding in upgrading that file.

Now fixed in 1.4 code. Have done a quick job to fix up the links tables on wikimedia sites; searchindex will update
gradually.

luc.vanoostenryck wrote:

Works for me. Thanks.

zigger wrote:

*** Bug 1439 has been marked as a duplicate of this bug. ***

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:21 AM