File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ public function reset()
8888 $ this ->siteConfig = null ;
8989 $ this ->title = null ;
9090 $ this ->body = null ;
91+ $ this ->image = null ;
9192 $ this ->nativeAd = false ;
9293 $ this ->date = null ;
9394 $ this ->language = null ;
Original file line number Diff line number Diff line change @@ -957,11 +957,11 @@ private function convert2Utf8($html, array $headers = [])
957957 $ html_head = substr ($ html , 0 , 50000 );
958958 if (preg_match ('/^<\?xml\s+version=(?:"[^"]*"| \'[^ \']* \')\s+encoding=("[^"]*"| \'[^ \']* \')/s ' , $ html_head , $ match )) {
959959 $ encoding = trim ($ match [1 ], '" \'' );
960- } elseif (preg_match ('/<meta\s+http-equiv= [" \']?Content-Type[" \']? content= [" \'][^;]+;\s*charset=[" \']?([^;" \'>]+)/i ' , $ html_head , $ match )) {
960+ } elseif (preg_match ('/<meta\s+http-equiv\s*=\s* [" \']?Content-Type[" \']? content\s*=\s* [" \'][^;]+;\s*charset=[" \']?([^;" \'>]+)/i ' , $ html_head , $ match )) {
961961 $ encoding = trim ($ match [1 ]);
962962 } elseif (preg_match_all ('/<meta\s+([^>]+)>/i ' , $ html_head , $ match )) {
963963 foreach ($ match [1 ] as $ _test ) {
964- if (preg_match ('/charset= [" \']?([^" \']+)/i ' , $ _test , $ _m )) {
964+ if (preg_match ('/charset\s*=\s* [" \']?([^" \']+)/i ' , $ _test , $ _m )) {
965965 $ encoding = trim ($ _m [1 ]);
966966 break ;
967967 }
You can’t perform that action at this time.
0 commit comments