3
1
Back

Or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } function get_xpath_dealie($link) { } /* absolute URL is ready! */ return $scheme.'://'.$abs; } function mangle_article($article) { if (!$alt_text || $alt_text == $article['title'] || strpos($article['title'], $title_text) !== false){ } elseif (strpos($alt_text, $title_text) !== False) { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } // Scenes From A Multiverse (to get alt tags if (preg_match("@.*()@", $article['content'], $matches)) { // Drugs and Wires elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { // Timothy Winchester (People I Know elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { // Doghouse Diaries, which has broken alt tags textified. $doc->loadHTML($article['content']); //no-op $imgs = $xpath->query('//img'); $alt_text = trim($entry->getAttribute('title')); $result_html .

New Pull Request