https://bugzilla.wikimedia.org/show_bug.cgi?id=17182

           Summary: Auto URL linker in API formatted output doesn't match
                    Wikipedia articles with parens
           Product: MediaWiki
           Version: unspecified
          Platform: All
               URL: http://en.wikipedia.org/w/api.php?action=opensearch&sear
                    ch=Neptune&limit=50&format=xmlfm
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: API
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


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 <.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to