Skip to content

Commit

Permalink
Reverse logic of html5() Method
Browse files Browse the repository at this point in the history
Resolves issue where calling $qp('<strong>Content</strong>')->html5() would return an empty string, and calling $qp('<strong>Content</strong>')->html5('') would return <strong>Content</strong>. The correct logic, per ->html(), is to reverse how this method works.
  • Loading branch information
jakejackson1 committed Dec 11, 2022
1 parent eaacb01 commit 9b36844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DOMQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ public function html5($markup = null)
$html5 = new HTML5($this->options);

// append HTML to existing
if ($markup === null) {
if (isset($markup)) {
// Parse the HTML and insert it into the DOM
$doc = $html5->loadHTMLFragment($markup);
$this->removeChildren();
Expand Down

0 comments on commit 9b36844

Please sign in to comment.