Last modified: 2014-07-24 16:49:08 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 T67976, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65976 - replaceExcept and hyperlink exception
replaceExcept and hyperlink exception
Status: NEW
Product: Pywikibot
Classification: Unclassified
textlib.py (Other open bugs)
compat-(1.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-31 16:50 UTC by Betacommand
Modified: 2014-07-24 16:49 UTC (History)
1 user (show)

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


Attachments

Description Betacommand 2014-05-31 16:50:02 UTC
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/|title='The 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/|title='The

When in reality only url is:

http://www.tvsquad.com/2010/11/22/the-simpsons-meet-avatar-video/

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


Navigation
Links