Skip to content

Commit 5f52903

Browse files
committed
sanitize styles from files
1 parent bb1ce8c commit 5f52903

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/compatibility/blocksy/index.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ function( $file ) {
152152
}
153153
);
154154

155+
$styles_from_files = '';
155156
foreach ( $blocksy_static_files as $file ) {
156157
if ( isset( $file['url'] ) ) {
157158
$file_path = get_template_directory() . $file['url'];
@@ -174,16 +175,18 @@ function( $file ) {
174175
}
175176
$content = file_get_contents( $file_path );
176177
if ( $content !== false ) {
177-
$styles .= $content;
178+
$styles_from_files .= $content;
178179
}
179180

180181
}
181182
}
182183
}
183184
}
184185

185-
// sanitize all added styles once
186-
$styles = stackable_sanitize_css_string( $styles );
186+
// sanitize styles from files
187+
$styles_from_files = stackable_sanitize_css_string( $styles_from_files );
188+
189+
$styles .= $styles_from_files;
187190
return $styles;
188191
}
189192

0 commit comments

Comments
 (0)