Given the following template:
<style type="text/css">
@import "{{ "css/demo.css" | relURL }}";
@import "{{ "css/demo.css" | absURL }}";
</style>
I would expect the rendered template to look like this:
<style type="text/css">
@import "/site/css/demo.css";
@import "http://localhost:1313/site/css/demo.css";
</style>
However, Hugo is rendering the following:
<style type="text/css">
@import "\2fsite\2f css\2f demo.css";
@import "http\3a\2f\2flocalhost\3a 1313\2fsite\2f css\2f demo.css";
</style>
Interestingly enough, it works on all the browsers I tried (Chrome, FF, IE). If I move the lines outside of the “style” block, Hugo renders the content as I would expect. There’s some kind of CSS black magic going on.
Is this a bug or a “feature”? It makes visually verifying the rendered code extremely difficult. I’m using the latest from the master branch. I’m happy to create an issue on Github is this is a bug. Thanks