]> git.wh0rd.org Git - tt-rss.git/commitdiff
rewrite_relative_url: add theoretical fix for magnet links (refs #436)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 11 Mar 2012 08:36:08 +0000 (12:36 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 11 Mar 2012 08:36:08 +0000 (12:36 +0400)
include/functions.php

index 8a3c607f3400f968acadea2c6721b188504458c3..84b6da01530e79b979cf7570220e260227b4ff3d 100644 (file)
         * @return string Absolute URL
         */
        function rewrite_relative_url($url, $rel_url) {
-               if (strpos($rel_url, "://") !== false) {
+               if (strpos($rel_url, "magnet:") === 0) {
+                       return $rel_url;
+               } else if (strpos($rel_url, "://") !== false) {
                        return $rel_url;
                } else if (strpos($rel_url, "/") === 0)
                {