[wp-trac] [WordPress Trac] #49937: Magnet links are being broken when saving posts using Classic Editor

WordPress Trac noreply at wordpress.org
Fri Apr 17 22:02:39 UTC 2020


#49937: Magnet links are being broken when saving posts using Classic Editor
--------------------------+------------------------------
 Reporter:  KarelDonk     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  5.4
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by KarelDonk):

 Replying to [comment:1 joyously]:
 > There were protocols ''added''
 https://developer.wordpress.org/reference/functions/wp_allowed_protocols/

 The magnet links used to work for sure in the WordPress 4.x versions. With
 one of the later updates something got added that filters away the magnet
 link from the href attribute when saving a post.

 > How did magnet links work before? They seem crazy complicated.

 I would simply select the text in the editor and then click the link
 button to add the link, and in the URL field paste the magnet link. Even
 in the most basic form it does not survive a save anymore. Below is an
 example of a basic magnet link which should be placed in the href
 attribute of an A tag.

 Example: magnet:?xt=urn:btih:test&dn=Test%20Link

 in a link: <a href="magnet:?xt=urn:btih:test&dn=Test%20Link">Test</a>

 You can create magnet links on this site to try:
 https://magnetlinkgenerator.com/

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49937#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list