Skip to content

Commit

Permalink
suppress XML errors in Button shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
acobster authored Jul 18, 2019
1 parent e54e6ad commit b284188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Conifer/Shortcode/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function render(array $atts = [], string $html = '') : string {
$dom = new DOMDocument();

// prevent doctype, html/body tags from being added
$dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$dom->loadHTML($html, LIBXML_NOERROR | LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);

// get the first <a> in the markup
$link = $dom->getElementsByTagName('a')->item(0);
Expand Down

0 comments on commit b284188

Please sign in to comment.