From 45457786b4ebb8c4cafdfb14848d67fc23014875 Mon Sep 17 00:00:00 2001 From: Daan van den Bergh <18595395+Dan0sz@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:06:14 +0100 Subject: [PATCH] Update class-gistpress.php Mute warnings. --- includes/class-gistpress.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/class-gistpress.php b/includes/class-gistpress.php index c92acba..1b4140a 100644 --- a/includes/class-gistpress.php +++ b/includes/class-gistpress.php @@ -463,6 +463,8 @@ public function process_gist_html( $html, array $args ) { $html = '' . $html; $dom = new DOMDocument(); + // Suppress warnings for invalid tags. + libxml_use_internal_errors(true); $dom->loadHTML( $html, LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED ); $lines = $dom->getElementsByTagName( 'tr' );