Make sure to put quotes around your url, then it should work just fine.
Not using quotes or doublequites IS supported by css, but as soon as you have whitespace or special characters in the url, its required. Since we can't now before at runtime if the media-url will contain any special characters due to the path of the media item, C1 requires quotes to prevent accidentally generating an url which will break the css.
MediaUrls.BuildUrl()
is infrastructure code and not intended to be called from ie. a razor view like in your example.Not using quotes or doublequites IS supported by css, but as soon as you have whitespace or special characters in the url, its required. Since we can't now before at runtime if the media-url will contain any special characters due to the path of the media item, C1 requires quotes to prevent accidentally generating an url which will break the css.