Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Brackets in wikipedia links moved outside link

Options

Comments

  • Closed Accounts Posts: 3,609 ✭✭✭Boards.ie: Danny


    This is kind of trivial and I don't know if it's a boards thing as such but I've noticed that whenever anyone posts a link to a Wikipedia article containing brackets at the end that when the post is submitted the link is incorrectly parsed with the closing bracket put outside the [/url] tag, making an invalid link.

    Examples:
    http://en.wikipedia.org/wiki/Arrested_Development_(TV_series)
    http://en.wikipedia.org/wiki/Ramstein_(disambiguation)

    In advanced mode, using the link button, the parsing is OK:
    http://en.wikipedia.org/wiki/Guatemala_(disambiguation)

    Cheers for the bug report - it would seem like the url parser isn't able to handle this correctly all right. Will file a bug report and get to it as soon as we can :)


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    It's a "clever" feature so that when I stick a link in brackets (www.google.com), it recognises that the closing bracket isn't part of the link.

    Obviously though it fails to recognise when it should be part of the link.


  • Closed Accounts Posts: 3,609 ✭✭✭Boards.ie: Danny


    Yep, though we could take a look at the parser and see if there are improvements to be made for certain sites (e.g. wikipedia) if not for all sites :)


  • Moderators, Arts Moderators Posts: 35,403 Mod ✭✭✭✭pickarooney


    If there's an open bracket after the start of the link then include any closed brackets thereafter? Sounds a bit tricky but then you don't get paid for 'easy'.:D


  • Moderators, Arts Moderators Posts: 35,403 Mod ✭✭✭✭pickarooney


    I'm not sure if you changed anything or if Wikipedia changed something but this morning when I followed a link to

    http://en.wikipedia.org/wiki/Troll_(Internet

    It opened the right page


  • Advertisement
  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Looks like Wikipedia has a special redirect set up for that page. Probably a common enough hit to warrant it.


  • Closed Accounts Posts: 3,609 ✭✭✭Boards.ie: Danny


    The quick way around this is to just throw in an underscore after a link that ends with a right-bracket.

    The parser for URLs is not simple, the regex is a beast. The issue comes down to using a regular expression to identify if a previous open-bracket was detected in a URL.

    It's taken a while and involves a completely new regex for URL parsing, but it should be deployed today or tomorrow and this issue shouldn't crop up anymore.

    Rolled back, it hates attachments in [img]tags :([/img]


  • Closed Accounts Posts: 11,924 ✭✭✭✭RolandIRL


    Love the new prefix on this thread :pac:


  • Closed Accounts Posts: 3,609 ✭✭✭Boards.ie: Danny


    It very nearly drove me to madness, but I think I've got it cracked.

    I'll get the improved new regex URL parser rolled out tomorrow morning and watch for another bug report :D


  • Closed Accounts Posts: 3,609 ✭✭✭Boards.ie: Danny


    Rolled out the new new regex there, hopefully this will be the end of it :)


  • Advertisement
  • Moderators, Arts Moderators Posts: 35,403 Mod ✭✭✭✭pickarooney


    Looking good. Nice work, Danny :)


Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.

Advertisement