Fix build
This commit is contained in:
parent
4e5275ca0e
commit
331fb4f11b
@ -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(())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user