From 1bdae9a815aa7b4a132700314e9d15c3b1ad77bf Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Tue, 22 Apr 2025 10:48:19 -0700 Subject: [PATCH] Update for FW switching to sending Binary instead of raw html --- libs/shortcode.php | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/libs/shortcode.php b/libs/shortcode.php index c60d94d..2ade5e3 100644 --- a/libs/shortcode.php +++ b/libs/shortcode.php @@ -1,13 +1,53 @@ loadHTML(loadHTML5(file_get_contents($url)), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); + @$dom->loadHTML(loadHTML5($html_content), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $dom->documentURI = $url; $divs = $dom->getElementsByTagName('div'); foreach ($divs as $div) { @@ -59,4 +99,4 @@ function fwembed_shortcode( $atts ) { $store_render = '
' . PHP_EOL . $store_html . PHP_EOL . '
'; return $store_render; } -add_shortcode( 'fourthwall', 'fwembed_shortcode' ); \ No newline at end of file +add_shortcode( 'fourthwall', 'fwembed_shortcode' );