about summary refs log tree commit diff stats
path: root/src/server/buffer.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-14 03:18:52 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-14 03:47:39 +0200
commit1c494d3fd5fb746d5a5b6d582119cda261e1e7b5 (patch)
treef8d79b5d5f48163c2baea7455192a0e4580eca6b /src/server/buffer.nim
parent7ebc5fb31478e9568b95359562776adc7d072d82 (diff)
downloadchawan-1c494d3fd5fb746d5a5b6d582119cda261e1e7b5.tar.gz
Update submodules
Diffstat (limited to 'src/server/buffer.nim')
-rw-r--r--src/server/buffer.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim
index 053483b5..6303fd65 100644
--- a/src/server/buffer.nim
+++ b/src/server/buffer.nim
@@ -52,6 +52,7 @@ import xhr/formdata as formdata_impl
 
 import chakasu/charset
 import chakasu/decoderstream
+import chakasu/encoderstream
 
 import chame/tags
 
@@ -605,7 +606,8 @@ proc loadResource(buffer: Buffer, elem: HTMLLinkElement): EmptyPromise =
           # utf8 anyways
           let ss = newStringStream(s.get)
           #TODO non-utf-8 css
-          let source = newDecoderStream(ss, cs = CHARSET_UTF_8).readAll()
+          let ds = newDecoderStream(ss, cs = CHARSET_UTF_8)
+          let source = newEncoderStream(ds, cs = CHARSET_UTF_8).readAll()
           let ss2 = newStringStream(source)
           elem.sheet = parseStylesheet(ss2))