mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-26 19:36:52 +03:00
[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){
|
||||
foreach($content->find('img') as $image){
|
||||
if(is_null(strpos($image->src, "http"))
|
||||
&& is_null(strpos($image->src, "//"))
|
||||
&& is_null(strpos($image->src, "data:")))
|
||||
if(strpos($image->src, 'http') === false
|
||||
&& strpos($image->src, '//') === false
|
||||
&& strpos($image->src, 'data:') === false)
|
||||
$image->src = $server . $image->src;
|
||||
}
|
||||
return $content;
|
||||
|
|
Loading…
Reference in a new issue