3
1
Back

Shafthole_height, $fn = stem_faces); // Widening part at the first // only keep everything starting at the first elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Three Panel Soul // Three Panel Soul elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { // CTRL+ALT+DEL // CTRL+ALT+DEL elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'comics')]", $article); } // Softer World (alt tags), Dinosaur Comics Cleanup elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); } /* 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; } /* replace '//' or '/./' or '/foo/../' with '/' */ $re .

New Pull Request