From c44b881e69c075731a05ddef1f7fd4c9d6af4ec2 Mon Sep 17 00:00:00 2001 From: Sam Denty Date: Sat, 30 Jan 2021 18:03:06 +0000 Subject: [PATCH] fix --- Cargo.toml | 2 +- src/utils.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 02419d6..95b4d02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "site_icons" version = "0.1.0" authors = ["Sam Denty "] edition = "2018" -license = "gpl-3.0" +license = "GPL-3.0" homepage = "https://github.com/samdenty/site_icons" repository = "https://github.com/samdenty/site_icons" documentation = "https://docs.rs/site_icons" diff --git a/src/utils.rs b/src/utils.rs index 4f551b0..91d5ebb 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -28,6 +28,9 @@ pub fn encode_svg(svg: &str) -> String { svg.into() }; + // use single quotes instead of double to avoid encoding. + let encoded = regex!("\"").replace_all(&encoded, "'"); + // remove whitespace let encoded = regex!(r">\s{1,}<"); let encoded = regex!(r"\s{2,}").replace_all(&encoded, " ");