Escape text-only flairs

This commit is contained in:
spikecodes 2021-07-19 10:20:00 -07:00
parent be253d40dd
commit 45a5778571
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB
3 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View File

@ -609,7 +609,7 @@ checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
[[package]]
name = "libreddit"
version = "0.14.11"
version = "0.14.12"
dependencies = [
"askama",
"async-recursion",

View File

@ -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"

View File

@ -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(),
},