aslansky/css-sprite

Allow network-path reference "//domain.com" or "http://domain.com" for css-image-path option

Closed this issue · 0 comments

Currently the --css-image-path option only allows "../domain" or "/domain" paths. For certain dynamics setups (A/B tests), being able to pass in a path with a separate domain name is needed.

E.g.:
HTML: domain.com
CSS: domain.com
IMGS: cdnDomain.com

Currently, passing in "http://cdnDomain.com" outputs to "http:/cdnDomain.com", which is incorrect and is interpreted by browsers as an absolute path ("domain.com/cdnDomain.com"). Passing in "//cdnDomain.com" also gets its "//" truncated and results in an absolute path, "/cdnDomain.com".

The expectation is that "//" should be maintained and not trimmed.