diff --git a/admin/create-theme/theme-block.php b/admin/create-theme/theme-block.php deleted file mode 100644 index e69de29b..00000000 diff --git a/admin/create-theme/theme-media.php b/admin/create-theme/theme-media.php index eccd3249..23b9ffe4 100644 --- a/admin/create-theme/theme-media.php +++ b/admin/create-theme/theme-media.php @@ -114,7 +114,7 @@ function turn_off_reject_unsafe_urls( $args ) { //see, we might be running this in a docker container //and if that's the case let's try again on port 80 $parsed_url = parse_url( $url ); - if ( $parsed_url['host'] == 'localhost' && $parsed_url['port'] !== '80' ) { + if ( 'localhost' === $parsed_url['host'] && '80' !== $parsed_url['port'] ) { $download_file = download_url( str_replace( 'localhost:' . $parsed_url['port'], 'localhost:80', $url ) ); } } diff --git a/admin/create-theme/theme-templates.php b/admin/create-theme/theme-templates.php index 266e7ccd..b205bde6 100644 --- a/admin/create-theme/theme-templates.php +++ b/admin/create-theme/theme-templates.php @@ -261,6 +261,7 @@ public static function escape_paragraph( $block ) { $doc->loadHTML( $content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD ); $elements = $doc->getElementsByTagName( '*' ); foreach ( $elements as $element ) { + // phpcs:ignore $element->nodeValue = self::escape_text( $element->nodeValue ); } $block['innerContent'][0] = html_entity_decode( $doc->saveHTML() );