diff options
Diffstat (limited to 'src/io')
-rw-r--r-- | src/io/buffer.nim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/io/buffer.nim b/src/io/buffer.nim index 4020c2f2..370e8209 100644 --- a/src/io/buffer.nim +++ b/src/io/buffer.nim @@ -720,10 +720,11 @@ proc loadResources(buffer: Buffer, document: Document) = if elem.rel == "stylesheet": let url = parseUrl(elem.href, document.location.some) if url.issome: - let res = buffer.loader.getPage(url.get) - if res.s != nil and res.contenttype == "text/css": - let sheet = parseStylesheet(res.s.readAll()) - elem.parentElement.sheets.add(sheet) + if url.get.scheme == buffer.location.scheme: + let res = buffer.loader.getPage(url.get) + if res.s != nil and res.contenttype == "text/css": + let sheet = parseStylesheet(res.s.readAll()) + elem.parentElement.sheets.add(sheet) for i in countdown(elem.children.high, 0): let child = elem.children[i] |