3
1
Back

For you if you like. Or both. Pointy_external_indicator = false; if ($alt_text && !$title_text){ } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } function init($host) { // Eat That Toast elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // Jesus & Mo elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { //also get the blog $entries = $xpath->query($query); $result_html = ''; $orig_src = $entry->getAttribute('src'); $new_src = $this->rel2abs($orig_src, $article['link']); if ($alt_text && !$title_text){ $text_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $alt_text); $para_element->appendChild($text_element); } elseif (strpos($alt_text, $title_text) !== False) { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Invisible Bread (make the bread visible) $article['content'] = $matches[1]; $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); } /* dirty absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with .

New Pull Request