Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Including Boostrap less file generate absolute URLs #59

Open
wambaloo opened this issue Dec 8, 2016 · 0 comments
Open

Including Boostrap less file generate absolute URLs #59

wambaloo opened this issue Dec 8, 2016 · 0 comments

Comments

@wambaloo
Copy link

wambaloo commented Dec 8, 2016

Hi !

I just found that including less bootstrap file generate absolute URLs for fonts. It cause glyphicon crash and not displayed.
I write a workaround in my local files but I really don't know if it's a real bug or if it's a configuration to do.

In my AssetsFileManager.php, line 208, I added these lines:

/* HACK LPO TO REPLACE ABSOLUTE URLS BY RELATIVES URL */
        $regexRelativeUrl = "/(url\(')(C:)?[a-zA-Z0-9\/]*(\/bootstrap\/less\/fonts)/i";
        if (preg_match_all($regexRelativeUrl, $sAssetFileFilteredContent, $matches)) {
            $replace = array_unique($matches[0]);
            foreach ($replace as $search) {
                $sAssetFileFilteredContent = str_replace($search, "url('../fonts", $sAssetFileFilteredContent);
            }
        }
        /* END HACK */
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant