Fix build

This commit is contained in:
Bill Thiede 2024-07-22 12:19:45 -07:00
parent 4e5275ca0e
commit 331fb4f11b

View File

@ -1,6 +1,7 @@
use std::fs; use std::fs;
use server::sanitize_html; use server::sanitize_html;
use url::Url;
fn main() -> anyhow::Result<()> { fn main() -> anyhow::Result<()> {
let mut args = std::env::args().skip(1); let mut args = std::env::args().skip(1);
@ -9,7 +10,7 @@ fn main() -> anyhow::Result<()> {
println!("Sanitizing {src} into {dst}"); println!("Sanitizing {src} into {dst}");
let bytes = fs::read(src)?; let bytes = fs::read(src)?;
let html = String::from_utf8_lossy(&bytes); let html = String::from_utf8_lossy(&bytes);
let html = sanitize_html(&html, "")?; let html = sanitize_html(&html, "", &Url::parse("http://example.com")?)?;
fs::write(dst, html)?; fs::write(dst, html)?;
Ok(()) Ok(())