3
1
Back

= $entry->getAttribute('alt'); $alt_text = trim($entry->getAttribute('alt')); $alt_text = $entry->getAttribute('alt'); $alt_text = trim($img->getAttribute('alt')); if (!$alt_text || $alt_text == $article['title'] || strpos($article['title'], $alt_text) !== False) { if ($rel[0]=='#' || $rel[0]=='?') { return $base . $rel; } /* 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! */ Assorted updates Assorted updates Assorted updates elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } // draw a horizontal cylinder around the outer.

New Pull Request