Signed-off-by: Dude so hot <djohn@fbi.gov>
This commit is contained in:
Dude so hot authored and renovate[bot] committed 2024-09-14 20:08:51 +08:00
1 parent 731af586af
commit eb3b53ee5b
1 file changed
+1
+1
View File
@@ -112,6 +112,7 @@ where
let value = {
// SAFETY: ktor client ensure html content is valid utf-8.
let html = unsafe { from_utf8_unchecked(&buffer[..limit as usize]) };
let dom = tl::parse(html, ParserOptions::default()).map_err(|e| anyhow!(e))?;
ensure!(dom.version().is_some(), "{html}");
f(&dom, html)?