https://bugzilla.wikimedia.org/show_bug.cgi?id=55214
Web browser: --- Bug ID: 55214 Summary: Cosmetic: Sign "_" replaced with space for [[http://links]] Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
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%5C_page%5C%5D%5C] 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%...
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
https://bugzilla.wikimedia.org/show_bug.cgi?id=55214
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/bugs/1407
pywikipedia-bugs@lists.wikimedia.org