and with absolute links return preg_replace( "/<(a|img)(.*?)(href|src)=('|\")\/(.*?)('|\")/is", "<\\1\\2\\3=\"".$home."/\\5\"", $content); } // just return content untouched if it's not a feed return $content; } ?>