diff --git a/includes/create-theme/theme-media.php b/includes/create-theme/theme-media.php index 7e0afa9c..af3c8dc9 100644 --- a/includes/create-theme/theme-media.php +++ b/includes/create-theme/theme-media.php @@ -94,7 +94,7 @@ public static function get_media_absolute_urls_from_template( $template ) { public static function make_relative_media_url( $absolute_url ) { if ( ! empty( $absolute_url ) && CBT_Theme_Utils::is_absolute_url( $absolute_url ) ) { $folder_path = self::get_media_folder_path_from_url( $absolute_url ); - return '' . $folder_path . basename( $absolute_url ); + return '' . $folder_path . basename( $absolute_url ); } return $absolute_url; } diff --git a/tests/test-theme-media.php b/tests/test-theme-media.php index ee96ffd2..75865332 100644 --- a/tests/test-theme-media.php +++ b/tests/test-theme-media.php @@ -56,7 +56,7 @@ public function test_template_with_media_correctly_prepared() { $this->assertContains( 'http://example.com/image.jpg', $new_template->media ); // The pattern is correctly encoded - $this->assertStringContainsString( 'pattern ); + $this->assertStringContainsString( 'pattern ); } @@ -77,7 +77,7 @@ public function test_make_group_block_local() { $this->assertContains( 'http://example.com/image.jpg', $new_template->media ); // The pattern is correctly encoded - $this->assertStringContainsString( '{"backgroundImage":{"url":"/assets/images/image.jpg"', $new_template->pattern ); + $this->assertStringContainsString( '{"backgroundImage":{"url":"/assets/images/image.jpg"', $new_template->pattern ); } }