diff --git a/Cargo.lock b/Cargo.lock index 6768a97..30d913e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -609,7 +609,7 @@ checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" [[package]] name = "libreddit" -version = "0.14.11" +version = "0.14.12" dependencies = [ "askama", "async-recursion", diff --git a/Cargo.toml b/Cargo.toml index 1275fe2..0b3fa30 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "libreddit" description = " Alternative private front-end to Reddit" license = "AGPL-3.0" repository = "https://github.com/spikecodes/libreddit" -version = "0.14.11" +version = "0.14.12" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2018" diff --git a/src/utils.rs b/src/utils.rs index 0933d15..3526578 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -39,7 +39,7 @@ impl FlairPart { Self { flair_part_type: value("e").to_string(), value: match value("e") { - "text" => esc!(value("t")).to_string(), + "text" => esc!(value("t")), "emoji" => format_url(value("u")), _ => String::new(), }, @@ -52,7 +52,7 @@ impl FlairPart { "text" => match text_flair { Some(text) => vec![Self { flair_part_type: "text".to_string(), - value: text.to_string(), + value: esc!(text), }], None => Vec::new(), },