3
1
Back

(preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = preg_replace("@@", '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $img = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $img; } } } // XKCD (alt tags we don't need to call out for) elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { // Invisible Bread (make the bread visible if (preg_match("@.*(textContent . "

"; } } foreach($imgs as $img){ $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; // only keep everything starting at.

New Pull Request