diff options
author | bptato <nincsnevem662@gmail.com> | 2024-02-22 22:54:53 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-02-22 23:09:54 +0100 |
commit | 8ad93c79084e74b29b9d32ce8d9675439e02e0b0 (patch) | |
tree | 21f7958e3e97efcdd93dbd0e71a9c23bc1cf3a6f /src/html | |
parent | 6f68626e202f93991f678086634692e6366958c6 (diff) | |
download | chawan-8ad93c79084e74b29b9d32ce8d9675439e02e0b0.tar.gz |
buffer: remove BufferSource
Aside from being a wrapper of Request, it was just storing the -I charset, except even that didn't actually work. Whoops. This fixes -I effectively not doing anything; now it's a forced override that even disables BOM sniffing. (If the user wants to decode a file using a certain encoding, it seems wise to assume that they really meant it.)
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/chadombuilder.nim | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/html/chadombuilder.nim b/src/html/chadombuilder.nim index 66e3a518..94c0237c 100644 --- a/src/html/chadombuilder.nim +++ b/src/html/chadombuilder.nim @@ -261,12 +261,9 @@ proc parseHTMLFragment*(element: Element, s: string): seq[Node] = return root.childList proc newHTML5ParserWrapper*(window: Window, url: URL, factory: CAtomFactory, - charset: Charset): HTML5ParserWrapper = - let opts = HTML5ParserOpts[Node, CAtom]( - isIframeSrcdoc: false, #TODO? - scripting: window != nil and window.settings.scripting - ) - let builder = newChaDOMBuilder(url, window, factory, ccTentative, charset) + confidence: CharsetConfidence, charset: Charset): HTML5ParserWrapper = + let opts = HTML5ParserOpts[Node, CAtom](scripting: window.settings.scripting) + let builder = newChaDOMBuilder(url, window, factory, confidence, charset) let wrapper = HTML5ParserWrapper( builder: builder, opts: opts, |