Labels Milestones
Back2?" 26b0f01955 Fix for two bugs in Doghouse Diaries rss: spaces in img src and quotes in alt/title text under images (extra useful for non-browser users elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // Achewood (alt tag) elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; $img = $matches[1]; } } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } if ($rel[0]=='#' || $rel[0]=='?') { $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '#' || $rel[0] == '?') { return $article; } /* absolute URL is ready! */ return $scheme.'://'.$abs; } function api_version() { * Use this if you feel like it, otherwise I'm just scratching my own itch here. * Most important: Keep it simple. Follow one pattern. Class _comics extends Plugin { function about() { return 2; } } if(ADD_IDS){ $article['content'] .= "
" . $msg . ""; } } // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); //also get the blog $entries = $xpath->query($query); $result_html = ''; } /* absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' .