https://bugzilla.wikimedia.org/show_bug.cgi?id=65976
Bug ID: 65976 Summary: replaceExcept and hyperlink exception Product: Pywikibot Version: compat (1.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: Phoenixoverride@gmail.com Web browser: --- Mobile Platform: ---
When using replaceExcept() and the hyperlink exception the exception is too greedy. A random example from enwiki:
<ref>{{cite web |url=http://www.tvsquad.com/2010/11/22/the-simpsons-meet-avatar-video/%7Ctitle=%2... Simpsons' Meet 'Avatar' (VIDEO) |author=Miller, Olivia |date=November 22, 2010 |work=''[[TV Squad]]'' |accessdate=2010-11-24 }}</ref>
The replace except treats everything between "ur=" and "'The" as part of the url. IE
http://www.tvsquad.com/2010/11/22/the-simpsons-meet-avatar-video/%7Ctitle=%2...
When in reality only url is:
http://www.tvsquad.com/2010/11/22/the-simpsons-meet-avatar-video/
https://bugzilla.wikimedia.org/show_bug.cgi?id=65976
Ricordisamoa ricordisamoa@openmailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ricordisamoa@openmailbox.or | |g Component|General |textlib.py
pywikipedia-bugs@lists.wikimedia.org