Last modified: 2009-01-31 13:05:25 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 T19182, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17182 - Auto URL linker in API formatted output doesn't match Wikipedia articles with parens
Auto URL linker in API formatted output doesn't match Wikipedia articles with...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-27 21:54 UTC by Brion Vibber
Modified: 2009-01-31 13:05 UTC (History)
3 users (show)

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


Attachments

Description Brion Vibber 2009-01-27 21:54:28 UTC
Wikipedia URLs frequently contain parenthetical bits in them from article disambiguation markers. The automatic URL highlighting in the API's jsonfm and xmlfm output doesn't handle these, for instance this bit:

      <Url>http://en.wikipedia.org/wiki/HMS_Neptune_(1797)</Url>

gets formatted to:

      <span style="color: blue;">&lt;Url&gt;</span><a href="http://en.wikipedia.org/wiki/HMS_Neptune_">http://en.wikipedia.org/wiki/HMS_Neptune_</a>(1797)<span style="color: blue;">&lt;/Url&gt;</span>

cutting off the "(1797)" from the link. Autolinker should be a bit friendlier to Wikipedia here; at a minimum, standard heuristics would allow for accepting the parenthetical as long as it's opened within the link. Alternately, since URLs here are generally standalone rather than part of text, it could just expand the link all the way until an illegal character appears such as " or <.
Comment 1 Roan Kattouw 2009-01-28 09:12:22 UTC
Should be easy to fix. Ironically, though, Bugzilla doesn't handle the (1797) part completely right either: the closing parenthesis isn't linked.
Comment 2 Roan Kattouw 2009-01-31 13:05:25 UTC
Fixed in r46641

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


Navigation
Links