diff --git a/functions.php b/functions.php index 7ca7dcf..345946e 100644 --- a/functions.php +++ b/functions.php @@ -131,7 +131,7 @@ function themeInit($archive){ } function showThumb($obj,$size=null,$link=false){ - preg_match_all( "/<[img|IMG].*?src=[\'|\"](.*?)[\'|\"].*?[\/]?>/", $obj->content, $matches ); + preg_match_all( '/]*src=["\']([^"\']*)["\'][^>]*>/i', $obj->content, $matches ); $thumb = ''; $options = Typecho_Widget::widget('Widget_Options'); $attach = $obj->attachments(1)->attachment; @@ -325,4 +325,4 @@ function compressHtml($html_source) { $compress .= $c; } return $compress; -} \ No newline at end of file +}