Last modified: 2014-06-05 20:10:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57283, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55283 - sectionencode incorrectly encoding
sectionencode incorrectly encoding
Status: RESOLVED INVALID
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:56 UTC by Kunal Mehta (Legoktm)
Modified: 2014-06-05 20:10 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:56:58 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1147/
Reported by: Anonymous user
Created on: 2010-03-16 22:21:02
Subject: sectionencode incorrectly encoding
Original description:
>>> wikipedia.sectionencode\(':/', 'utf-8'\)
'.3A/'
Which is incorrect as it is ":.2F"

The correct code for sectionencode\(\) should be:
return urllib.quote\(text.replace\(" ","\_"\).encode\(encoding\), safe=':'\).replace\("%","."\)

Also, it would be nice if encoding defaulted here to 'utf-8'
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:57:00 UTC
Could you check if the bug is present in the rewrite branch?
Comment 2 Ricordisamoa 2014-06-05 20:10:20 UTC
sectionencode() has been removed from compat:
https://www.mediawiki.org/wiki/Special:Code/pywikipedia/9494

...and it never existed in core.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links