Last modified: 2014-05-26 13:46:04 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 T57214, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55214 - Cosmetic: Sign "_" replaced with space for [[http://links]]
Cosmetic: Sign "_" replaced with space for [[http://links]]
Status: RESOLVED FIXED
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:44 UTC by Kunal Mehta (Legoktm)
Modified: 2014-05-26 13:46 UTC (History)
1 user (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:44:44 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

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


Navigation
Links