mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 19:46:21 +05:30
Update functions.php
This commit is contained in:
parent
f1f2b94e11
commit
71e2f00fa9
1 changed files with 2 additions and 2 deletions
|
|
@ -2250,7 +2250,7 @@ function menu($class = null)
|
|||
$html = parseNodes($nodes, null, $class);
|
||||
libxml_use_internal_errors(true);
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHTML($html);
|
||||
$doc->loadHTML('<meta charset="utf8">' . $html);
|
||||
|
||||
$finder = new DOMXPath($doc);
|
||||
$elements = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' dropdown-menu ')]");
|
||||
|
|
@ -3334,7 +3334,7 @@ function replace_href($string, $tag, $class, $url)
|
|||
|
||||
// Load the HTML in DOM
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHTML($string);
|
||||
$doc->loadHTML('<meta charset="utf8">' . $string);
|
||||
// Then select all anchor tags
|
||||
$all_anchor_tags = $doc->getElementsByTagName($tag);
|
||||
foreach ($all_anchor_tags as $_tag) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue