From ff904b2b0d6d844cb4d9624a5ef5e68e73ba6a5e Mon Sep 17 00:00:00 2001 From: Jonny Bull Date: Thu, 12 Sep 2019 12:20:53 +0100 Subject: [PATCH] Fix for media tags with spaces --- cssconcat.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cssconcat.php b/cssconcat.php index 7bda7b1..b453df2 100644 --- a/cssconcat.php +++ b/cssconcat.php @@ -133,7 +133,8 @@ function do_items( $handles = false, $group = false ) { } $handles = array_keys( $css ); - echo apply_filters( 'ngx_http_concat_style_loader_tag', "\n", $handles, $href, $media ); + $clean_media = str_replace( ' ', '-', $media ); + echo apply_filters( 'ngx_http_concat_style_loader_tag', "\n", $handles, $href, $media ); array_map( array( $this, 'print_inline_style' ), array_keys( $css ) ); } }