]> git.wh0rd.org Git - tt-rss.git/commitdiff
sanitize_rss: do not try to rewrite urls when article seems to contain href= attributes
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 30 Nov 2010 15:35:24 +0000 (18:35 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 30 Nov 2010 15:35:24 +0000 (18:35 +0300)
functions.php

index 90e23d89780c9110cea7eb17f8f110209de3dcfe..50c6f27fb4c964957bc6fe32401b2f47ef602f65 100644 (file)
                        $res = preg_replace('/<img[^>]+>/is', '', $res);
                }
 
-               $res = rewrite_urls($res);
+               if (strpos($res, "href=") === false)
+                       $res = rewrite_urls($res);
 
                $charset_hack = '<head>
                        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>