Escape text-only flairs
This commit is contained in:
parent
be253d40dd
commit
45a5778571
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -609,7 +609,7 @@ checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
|
||||
|
||||
[[package]]
|
||||
name = "libreddit"
|
||||
version = "0.14.11"
|
||||
version = "0.14.12"
|
||||
dependencies = [
|
||||
"askama",
|
||||
"async-recursion",
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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(),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user