forked from blallo/rss-bridge
[html] Fix img src replacement not working
strpos returns false if the needle was not found. See: http://php.net/manual/en/function.strpos.php#refsect1-function.strpos-returnvalues
This commit is contained in:
parent
5de03d6b9f
commit
bb8e7495d8
1 changed files with 3 additions and 3 deletions
|
@ -280,9 +280,9 @@ $keptText = array()){
|
||||||
|
|
||||||
function defaultImageSrcTo($content, $server){
|
function defaultImageSrcTo($content, $server){
|
||||||
foreach($content->find('img') as $image){
|
foreach($content->find('img') as $image){
|
||||||
if(is_null(strpos($image->src, "http"))
|
if(strpos($image->src, 'http') === false
|
||||||
&& is_null(strpos($image->src, "//"))
|
&& strpos($image->src, '//') === false
|
||||||
&& is_null(strpos($image->src, "data:")))
|
&& strpos($image->src, 'data:') === false)
|
||||||
$image->src = $server . $image->src;
|
$image->src = $server . $image->src;
|
||||||
}
|
}
|
||||||
return $content;
|
return $content;
|
||||||
|
|
Loading…
Reference in a new issue