Skip to content

Commit c380fa0

Browse files
committed
MC-15439: Deferred loading / parsing of JS
1 parent a748262 commit c380fa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Theme/Controller/Result/JsFooterPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function beforeSendResponse(\Magento\Framework\App\Response\Http $subject
2222
$script = [];
2323
if (strpos($content, '</body') > 0) {
2424
$content = preg_replace('#<!--(?!\s?/?ko).*?-->#s', '', $content);
25-
$pattern = '#<script.*?</script>#is';
25+
$pattern = '#<script[^>]*+(?<!text/x-magento-template.)>.*?</script>#is';
2626
$content = preg_replace_callback(
2727
$pattern,
2828
function ($matchPart) use (&$script) {

0 commit comments

Comments
 (0)