3
1
Back

Function mangle_article($article) { if (!$title_text || $title_text == $article['title'] || strpos($article['title'], $alt_text) !== False) { if (!$alt_text || strpos($article['title'], $title_text) !== false){ $text_element = $doc->createElement("i", $title_text); } elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // Doghouse Diaries, which has broken alt tags textified. Function rel2abs($rel, $base $path = preg_replace('#/[^/]*$#', '', $path); /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ return $scheme.'://'.$abs; } function mangle_article($article) { // Girls with Slingshots $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; .

New Pull Request