Automattic / juice

Juice inlines CSS stylesheets into your HTML source.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with escaping URLs

benjick opened this issue · comments

I'm trying to run juice.juiceResources on the url https://www.adlibris.com/se/bok/happy-food-20-om-hur-maltiden-och-lyckan-hanger-ihop-9789188745040

But I'm getting this error:

Error: The file /var/pricefinder/https:/s3.adlibris.com/dist/41cf43d50b259cd5c6202cd2bff95eb651046e00/dist/41cf43d50b259cd5c6202cd2bff95eb651046e00/material-icons.ttf was not found!

note: the single slash after https:

Looking at https://s3.adlibris.com/dist/41cf43d50b259cd5c6202cd2bff95eb651046e00/globals.css (which is from the original url) the following code is present:

@font-face{font-family:material-icons;src:url(/dist/41cf43d50b259cd5c6202cd2bff95eb651046e00/material-icons.ttf) format("truetype"),url(/dist/41cf43d50b259cd5c6202cd2bff95eb651046e00/material-icons.woff) format("woff"),url(/dist/41cf43d50b259cd5c6202cd2bff95eb651046e00/material-icons.svg#material-icons) format("svg");

Seems like the base url gets escaped (the double slash)