diff --git a/includes/class-gistpress.php b/includes/class-gistpress.php index db3d9c0..c92acba 100644 --- a/includes/class-gistpress.php +++ b/includes/class-gistpress.php @@ -412,9 +412,6 @@ public function get_gist_html( $url, array $args ) { $this->debug_log( '' . __( 'Raw Key (Transient & Post Meta):', 'gistpress' ) . ' ' . $raw_key, $shortcode_hash ); $this->debug_log( '' . __( 'Processed Output Key (Transient):', 'gistpress' ) . ' ' . $transient_key, $shortcode_hash ); - // Strip unnecessary elements from HTML output. - $html = preg_replace( '/^/i', '', str_ireplace( array( '', '', '', '' ), '', $html ) ); - return $html; } @@ -466,7 +463,7 @@ public function process_gist_html( $html, array $args ) { $html = '' . $html; $dom = new DOMDocument(); - $dom->loadHTML( $html ); + $dom->loadHTML( $html, LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED ); $lines = $dom->getElementsByTagName( 'tr' );