Detection of links with apostrophes

  • It's been reported to me that some URLs which contain commas are not displaying as proper links on my site. I've just done a test on this site and received the same result. Here's an example:


    https://en.wikipedia.org/wiki/St_Mary's_Church,_Broadwater


    If I create a link using the toolbar, then this URL works fine:


    https://en.wikipedia.org/wiki/St_Mary's_Church,_Broadwater


    The issue is not consistent. Only some pages with commas don't work, not all. Here's one that does work:


    https://en.wikipedia.org/wiki/Diners,_Drive-Ins_and_Dives


    So far, the only reports I've received are about wikipedia pages. Could there be a conflict in links that have both apostrophes and commas?


    thanks

    Jupiter

    I am a Newbie Admin. Please be gentle, I don't understand technical things.
    (Please can we have a full manual for this software)

  • Alexander Ebert

    Changed the title of the thread from “Links with commas not always working” to “Detection of links with apostrophes”.
  • This is interesting and seems to be related to a bug I found in the "Favicons" addon, posted in Tims Chat.

    Perhaps it belongs to the code of Wikipedia:!:

  • The apostrophe has a special meaning in bbcodes as it is being used as a delimiter for attributes. For this particular reason, the link detection uses a more defensive approach where it will only consume text that are most likely part of the link. Apostrophes are very rarely used in links and I'm a bit surprised that wikipedia started using them, given that they were not used for many, many years before.


    However, the link detection is a very critical component and making even slightest changes to the behavior can have devastating results. Therefore, we'll look into this in a future version.


    Users can always embed those links using the link button from the toolbar which properly embeds the link and removes any ambiguity that the link detection may otherwise trip over.