Version:
data-url 0.2.0 & master
Description
The following data URL:
data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><rect style='fill:%23000000;' width='100%' height='100%'/></svg>
produces a corrupted result with duplicate fields and unexpected values with DataUrl::process:
<svg xmlns='http://www.w3.org/2000/svg'><rect style='fill:#000000;' width='100000000;' width='100%' height='100000000;' width='100%' height='100%'/></svg>
Note that the data URL produces a full window black rectangle on Firefox and keeps the initial SVG intact.
SSCCE
use data_url::DataUrl;
static SVG: &str = r#"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><rect style='fill:%23000000;' width='100%' height='100%'/></svg>"#;
fn main() {
println!("{}", SVG);
let url = DataUrl::process(SVG).unwrap();
let (body, _) = url.decode_to_vec().unwrap();
let utf8 = std::str::from_utf8(&body).unwrap();
println!("{}", utf8);
}
Version:
data-url 0.2.0 & master
Description
The following data URL:
produces a corrupted result with duplicate fields and unexpected values with
DataUrl::process:Note that the data URL produces a full window black rectangle on Firefox and keeps the initial SVG intact.
SSCCE