Fixed regex bug introduced in previous commit

This commit is contained in:
Brian Ó Donnell
2015-12-30 12:49:22 -05:00
parent 9fc84933a7
commit 813d2cec27
+2 -2
View File
@@ -290,7 +290,7 @@ sub get_feed_items {
# extract image link and hover text from content:encoded if it exists
if( defined $item->{'content:encoded'} ){
$item->{'content:encoded'} =~ /img .* src=\\?'(https?:\/\/[^']+)/ unless $item->{'content:encoded'} =~ /img .* src=\\?"(https?:\/\/[^"]+)/;
$item->{'content:encoded'} =~ /img .* ?src=\\?'(https?:\/\/[^']+)/ unless $item->{'content:encoded'} =~ /img .* ?src=\\?"(https?:\/\/[^"]+)/;
if( defined $1 ){
$image = $1;
@@ -301,7 +301,7 @@ sub get_feed_items {
# extract image link and hover text from description if it exists
if( not length $image and defined $item->{'description'} ){
$item->{'description'} =~ /img .* src='(https?:\/\/[^']+)/ unless $item->{'description'} =~ /img .* src="(https?:\/\/[^"]+)/;
$item->{'description'} =~ /img .* ?src='(https?:\/\/[^']+)/ unless $item->{'description'} =~ /img .* ?src="(https?:\/\/[^"]+)/;
if( defined $1 ){
$image = $1;