3
1
Back

XS3 FM CV From c852e5d6ad8630143a633f6c4ffcb4d705a43337 Mon Sep 17 00:00:00 2001 Subject: [PATCH] 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 $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } function mangle_article($article) { // Eat That Toast elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } /* absolute URL is ready! */ } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { $img_tag = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get the blog $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Camp Weedonwantcha elseif (strpos($article['link'], 'cad-comic.com/cad.

New Pull Request