fix ImageProxy
This commit is contained in:
parent
0104c49c87
commit
c8003efd27
1 changed files with 5 additions and 1 deletions
|
|
@ -128,7 +128,11 @@ final class ImageProxyExtension extends Minz_Extension {
|
|||
|
||||
$doc = new DOMDocument();
|
||||
libxml_use_internal_errors(true); // prevent tag soup errors from showing
|
||||
$doc->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'));
|
||||
$content = mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8');
|
||||
if (!is_string($content)) {
|
||||
return '';
|
||||
}
|
||||
$doc->loadHTML($content);
|
||||
$imgs = $doc->getElementsByTagName('img');
|
||||
foreach ($imgs as $img) {
|
||||
if (!($img instanceof DOMElement)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue