Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1407/
Reported by: Anonymous user
Created on: 2012-02-17 19:16:12
Subject: Cosmetic: Sign "_" replaced with space for http://links
Original description:
1\. In some article you can find incorrect hyperlink formatting, like this one - \[\[http://google.com/some\_page\]\]
2\. In this case cosmtetic\_changes.py replaces this link as \[\[http://google.com/some page\]\] \(space instead underscore\)
3\. I think it's incorrect, even if article has incorrect formatted hyperlinks
4\. Example you can find in this edit as a result
python cosmetic\_changes.py -lang:ru -always -page:"Микаелян, Сергей Абгарович"
5\. It lloks, that you can avoid this situation just with moving string
text = self.cleanUpLinks\(text\)
under
text = self.fixSyntaxSave\(text\)
6\. So, it looks, that correct calls should be
text = self.fixSelfInterwiki\(text\)
text = self.standardizePageFooter\(text\)
text = self.cleanUpSectionHeaders\(text\)
text = self.putSpacesInLists\(text\)
text = self.translateAndCapitalizeNamespaces\(text\)
text = self.replaceDeprecatedTemplates\(text\)
text = self.resolveHtmlEntities\(text\)
text = self.validXhtml\(text\)
text = self.removeUselessSpaces\(text\)
text = self.removeNonBreakingSpaceBeforePercent\(text\)
text = self.fixSyntaxSave\(text\)
text = self.cleanUpLinks\(text\)
text = self.fixHtml\(text\)
text = self.fixStyle\(text\)
text = self.fixTypo\(text\)
text = self.fixArabicLetters\(text\)
7\.
Pywikipedia \[http\] trunk/pywikipedia \(r9901, 2012/02/16, 22:44:36\)
Python 2.6.7 \(r267:88850, Sep 19 2011, 13:25:28\)
\[GCC 4.5.2\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok
Version: unspecified
Severity: normal
See Also:
https://sourceforge.net/p/pywikipediabot/bugs/1407