Skip to content

Commit

Permalink
Fix issue load Font Awesome from CDN when minifyCSS
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Dec 29, 2022
1 parent e159aab commit c8da125
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/library/astroid/Document.php
Expand Up @@ -219,7 +219,7 @@ public function minifyCSS($html)
$stylesheetsUrls = [];
$html = preg_replace_callback('/(<link\s[^>]*href=")([^"]*)("[^>][^>]*rel=")([^"]*)("[^>]*\/>)/siU', function ($matches) use (&$stylesheetLinks, &$stylesheetsUrls) {
if (isset($matches[4]) && $matches[4] === 'stylesheet') {
if (strpos($matches[2], 'fonts.googleapis.com') > 0) {
if (strpos($matches[2], 'fonts.googleapis.com') > 0 || strpos($matches[2], 'use.fontawesome.com') > 0) {
return $matches[0];
}
$url = $this->_cssPath($matches[2]);
Expand Down

0 comments on commit c8da125

Please sign in to comment.