#8483 Markdown: image target URL fails when reaches 100 chars + FIX(?)

v1.15.0
closed
None
Wiki
nobody
2023-09-14
2022-12-07
No

Hi.

I've noticed on the wiki (on SourceForge) that some "image badges" and their links are not rendered correctly. Namely, the image is rendered, but links to some weird URL while the correct URL is rendered as plain text right after the image.

Sample: https://sourceforge.net/p/wipefreespace/wiki/Sandbox/ (hover the mouse over the image to see the URL).

Perhaps it's just an error on SF, but I've noticed that the failing link "suspiciously" exceeds 100 characters, while the working one doesn't. Looks like some hard-coded limit. Links nowadays can contain commit hashes or other long IDs, so I think the limit should be raised.
I've done a little digging in the code (although I'm far from being an expert in Python or any other technology used here) and may have found the place to fix this.
You can use the simple patch I'm attaching, or fix it in some other place (I haven't done any testing) or perhaps fix the "TODO" in the code and maybe get rid of the problem the right way.

Regards and thank you for your work!

1 Attachments

Discussion

  • Dave Brondsema

    Dave Brondsema - 2022-12-22

    Thanks for this suggestion. We'll probably investigate it in January. It hasn't been forgotten :)

     
  • Hi. Good to hear and no worries :)

     
  • Dave Brondsema

    Dave Brondsema - 2023-01-04
    • status: open --> closed
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2023-01-04

    The limit was initially done in [#8410] and then when [#8416] was done the limit wasn't needed at all any more, but we didn't realize it.

    So I've pushed a fix to remove the limit.

    (FYI this will probably go live on SourceForge later this week and then you'll need to edit your wiki page to make it update, since markdown outputs are cached)

     

    Related

    Tickets: #8410
    Tickets: #8416

  • Thank you!
    I'll check it out after a few days.

     
  • Even better with completely removing the limit :).
    Fix confirmed - works on SF as expected.
    Thanks again and keep up the good work! :)

     
  • Guillermo Cruz - 2023-09-14
    • Milestone: unreleased --> v1.15.0
     

Log in to post a comment.