Support for magnet links

סיכום מבוסס בינה מלאכותית

The discussion revolves around implementing support for magnet links in the Discourse platform. MentalNomad initially inquired about presenting magnet links in a clickable format, and Falco suggested adding “magnet” to the allowed href schemes. However, this solution did not render the links clickable.

riking pointed out limitations in the extraHrefMatchers mechanism in pretty-text.js.es6 and proposed using code blocks as a temporary workaround. sam suggested using a plugin to linkify words in posts, but noted it might require a small contribution to support magnet links. riking later mentioned the plugin has an issue with detecting links at the % character.

Is there an easy way to present a magnet link to a torrent in a way that renders as a clickable link for users?

Adding magnet to the allowed href schemes site setting should work, did you try that?

3 לייקים

Tried - it renders a blue link, but is not clickable and shows no link preview.

I logged out and back in after adding magnet to the allowed schemes, but did not restart anything. Is that necessary?

The extraHrefMatchers mechanism in pretty-text.js.es6 doesn’t seem to permit query strings or schemes without a ://…

In the meantime, you can paste the links in a code block for people to copy, e.g.:

magnet:?xt=urn:btih:e2467cbf021192c241367b892230dc1e05c0580e&dn=ubuntu-19.10-desktop-amd64.iso&tr=https%3A%2F%2Ftorrent.ubuntu.com%2Fannounce&tr=https%3A%2F%2Fipv6.torrent.ubuntu.com%2Fannounce

Let’s perhaps revisit this after IE is dropped.

8 לייקים

Easiest thing to do here would be to use

It may need a small contribution to support this

5 לייקים

Preach, brother! That day cannot come soon enough! :folded_hands:

לייק 1

Yep, it has a slight problem, seems to stop link detection at the %.