Page MenuHomePhabricator

LEFT-TO-RIGHT MARK makes categories() fail
Closed, ResolvedPublic

Description

Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1571/
Reported by: nu11zer0
Created on: 2013-01-30 19:36:16
Subject: LEFT-TO-RIGHT MARK makes categories() fail
Original description:
In categories() from class Page, if there is LEFT-TO-RIGHT MARK or other hidden characters in [[Category:, pywikibot will fail to capture this category. I noticed that in constructor of class Page, there is the code for stripping many hidden characters. So why don't we apply this code with category and others (I'm not sure if there are other things which need stripping hidden characters. Interwiki link? At least, I see many regular expressions for capturing links, these actions can fail with hidden character too.)

Pywikipedia trunk/pywikipedia/ (r11014, 2013/01/28, 20:55:48, ok)
Python 2.7.3 (default, Sep 26 2012, 21:53:58)
[GCC 4.7.2]
config-settings:
use_api = True
use_api_login = True
unicode test: ok


Version: core-(2.0)
Severity: major
See Also:
https://sourceforge.net/p/pywikipediabot/bugs/1571

Details

Reference
bz55155

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:23 AM
bzimport set Reference to bz55155.
bzimport added a subscriber: Unknown Object (????).

This was report as a compat issue, but I suspect this issue also exists in core, so setting this bug to be a core bug until it can be confirmed that it isnt.

Dalba claimed this task.
Dalba subscribed.

I created a page with the following content:

[[category:no-LTR]]
[[‎‎ca‎t‎ego‎ry‎‎:‎with‎-LTR‎]]

Calling categories() on the page returns:

[Category('Category:No-LTR'), Category('Category:With-LTR')]

So it seems to have been resolved in core.