richthegeek / phpsass

A compiler for SASS/SCSS written in PHP, brought up to date (approx 3.2) from a fork of PHamlP: http://code.google.com/p/phamlp/
http://phpsass.com/
382 stars 83 forks source link

Sass.php Windows path error in firefox #131

Open alfredleo opened 11 years ago

alfredleo commented 11 years ago

Sass.php after generating style uses wrong slash in Windows. So that firefox can't read the file.

Yii::app()->clientScript->registerCssFile($url . DIRECTORY_SEPARATOR . $dstFilename);

I changed this to this code so firefox now works fine.

$cssUrl = $url . DIRECTORY_SEPARATOR . $dstFilename; Yii::app()->clientScript->registerCssFile(str_replace('\', '/', $cssUrl));

Please take a look.

alfredleo commented 11 years ago

Main idea is that we should not use DIRECTORY_SEPARATOR in urls. Yii::app()->clientScript->registerCssFile($url . '/' . $dstFilename);

This is also a fix if $url does not contain DIRECTORY_SEPARATOR