Last modified: 2014-05-26 13:46:04 UTC
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:"Микаелян, Сергей Абгарович" http://ru.wikipedia.org/w/index.php?title=%D0%9C%D0%B8%D0%BA%D0%B0%D0%B5%D0%BB%D1%8F%D0%BD,\_%D0%A1%D0%B5%D1%80%D0%B3%D0%B5%D0%B9\_%D0%90%D0%B1%D0%B3%D0%B0%D1%80%D0%BE%D0%B2%D0%B8%D1%87&diff=prev&oldid=41840249 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
compat: https://git.wikimedia.org/commitdiff/pywikibot%2Fcompat.git/f2645f856d1f8530058259c4547359b3248e1d17 core: https://git.wikimedia.org/commitdiff/pywikibot%2Fcore.git/6ac688fe74c186d6fd862518613fe3eb26e29e89