Labels Milestones
Back$this->rel2abs($orig_src, $article['link']); if ($alt_text && !$title_text){ Various updates, additions /* dirty absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { 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) function about() { return $rel; } if ($rel[0] == '#' || $rel[0] == '?') { return array(0.1, return array( $html, $content_type ); } /* 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. $doc->loadHTML($article['content']); //no-op $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content'] .= "
" . $msg . ""; } } Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); //also get blog $entries = $xpath->query("//span[@class='rss-content']"); // Wondermark (alt tag already present foreach($imgs as $img){ $article['content'] .= $aftercomic; } } .