Skip to content

Commit

Permalink
Fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pbking committed Mar 20, 2024
1 parent 9165a1e commit 79342e8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
Empty file removed admin/create-theme/theme-block.php
Empty file.
2 changes: 1 addition & 1 deletion admin/create-theme/theme-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}
}
Expand Down
1 change: 1 addition & 0 deletions admin/create-theme/theme-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down

0 comments on commit 79342e8

Please sign in to comment.