Multiple magnet links in one message not displayed properly

Asked by utuser91

Hubs usually provide options for users to view latest uploads in a hub message using multiple magnet links. DC++ 0.802 displays them as
instead of 'Thunderbird Setup 16.0.1.exe (17.87 MiB)' displayed in say Apex DC++

This makes it virtually impossible to find stuff from hub messages and this is the only reason I am forced to use other dc clients. Is there a way out?

P.S. hub chats with a single magnet link seem to work satisfactorily though

Question information

English Edit question
DC++ Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
poy (poy) said :

the problem is not that there are multiple Magnet links but that they are enclosed with apostrophes ('). those are valid in URIs (unless otherwise specified by the scheme, but neither HTTP nor magnet schemes disallow them).

schemes aren't allowed to start with apostrophes however, so DC++ should still recognize "magnet" as a scheme here. it instead thinks that the scheme is "'magnet" (apostrophe at the beginning), which is a bug that will hopefully be fixed soon. once that is fixed, the text "'magnet:?xt=urn:tree:tiger:USYONQ7IISQDER2POIX2V7PHN6VDFQDLIRASSSQ&xl=18733400&dn=Thunderbird+Setup+16.0.1.exe'" will then appear as one apostrophe followed by a Magnet link to "Thunderbird Setup 16.0.1.exe'" (including the ending apostrophe), so there will be a link but it's going to be an invalid one. except for the first character, and provided schemes don't disallow them, apostrophes are allowed in URIs.

the solution is to modify the scripts that are generating these links enclosed by apostrophes to use a better delimiter instead, such as double-quotes (") or brackets (<>) as recommended in the URI RFC.

Revision history for this message
utuser91 (utuser91) said :

Umm sorry if my message was misleading but I added the apostrophes just so that the post looks clear. The actual hubchat message doesnt have the apostrophes.

Ok things have started getting weird now... I typed +uploads in a hub and it displays all magnet links with the garbage text (displays properly in apex dc) in the hubchat but then I copied all the displayed stuff and sent it as a PM to someone and voila! all the magnet links are identified properly. So where exactly is the problem?? beats me!

Revision history for this message
poy (poy) said :

strange. would be great if you could find a clear message for which links aren't properly formatted; but that may be difficult since you say it's somewhat random...

perhaps it has to do with the chat length? does it happen when the hub chat window has been filled with a lot of previous messages?

what about regular links like http://link, etc; do they also loose their formatting?

Revision history for this message
utuser91 (utuser91) said :

Well I got back and experimented a lil bit and this is what I find:

Users posted links or magnets in the hubchat are formatted properly (even multiple links/magnets with lots of text and special characters, even * )
Welcome messages of SOME hubs or bot responses to commands like +uploads do NOT show properly formatted links/magnets

As I mentioned above only some hubs have this problem, others work perfectly fine, so I compared the results shown by the hubs and found that both the culprit hubs had the uploads section start with *** (asterisks) and the welcome message had * somewhere in the text. The other hubs had no * anywhere in their bot messages. This was pretty much the only difference I could see between the hubs so I think this hopefully is the problem.
I hope this issue can be solved soon because as you can see it is pretty annoying and weird if I may add :)

Revision history for this message
utuser91 (utuser91) said :

And incase it was not clear in my previous posts, these unformatted links cannot be activated by double clicking as well, so they are pretty much useless

Revision history for this message
poy (poy) said :

indeed, link formatting isn't being applied to status messages (messages sent directly by the hub, which don't have a sender, and that are displayed by DC++ with 3 stars).

converting to a bug.

Revision history for this message
utuser91 (utuser91) said :

Oh great! Just when I thought I was getting nowhere with this post.. Waiting for the new version!