mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
fix for & errors in URL
This commit is contained in:
parent
a74e07c491
commit
a57358f311
|
|
@ -19,6 +19,7 @@
|
|||
"ext-curl": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-dom": "*",
|
||||
"ext-libxml": "*",
|
||||
"symfony/polyfill-iconv": "^1.15",
|
||||
"symfony/polyfill-php72": "^1.15",
|
||||
"symfony/polyfill-php73": "^1.15",
|
||||
|
|
|
|||
|
|
@ -72,8 +72,11 @@ class Excerpts
|
|||
*/
|
||||
public static function getExcerptFromHtml($html, $tag)
|
||||
{
|
||||
$doc = new \DOMDocument();
|
||||
$doc = new \DOMDocument('1.0', 'UTF-8');
|
||||
$internalErrors = libxml_use_internal_errors(true);
|
||||
$doc->loadHTML($html);
|
||||
libxml_use_internal_errors($internalErrors);
|
||||
|
||||
$elements = $doc->getElementsByTagName($tag);
|
||||
$excerpt = null;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user