Crate svg_hush

source ·
Expand description

Filters SVG files to make them safe to host anywhere.

use svg_hush::*;
let mut file = "<svg xmlns='http://www.w3.org/2000/svg' />".as_bytes();
let mut filter = Filter::new();
filter.set_data_url_filter(data_url_filter::allow_standard_images);
let mut out = Vec::new();
filter.filter(&mut file, &mut out)?;

Modules

Structs

Enums

  • XML parsing error, I/O error, etc.