Skip to content

Commit

Permalink
Update functions.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danpros committed Dec 3, 2023
1 parent f1f2b94 commit 71e2f00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ')]");
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 71e2f00

Please sign in to comment.