Topic: UrlEncode asset_path in SASS

Was wondering if there's any way to url-encode asset path.

I'm trying to set a css background-image using a python thumbnail server that uses a url format:

http://images.domain.com/image?asset=my … height=300 where the width and height are set by SCSS variables at compile-time.

Even if there is just a REGEX or string replace function, I just need to get rid of the forwardslashes for it to work.

I cannot use <%= notation to call rails helpers as this file needs to be at the other end of a sass @import statement. So for now I seem to be a little stuck. Any help is much appreciated.