Escape text-only flairs

pull/255/head v0.14.12
spikecodes 1 year ago
parent be253d40dd
commit 45a5778571
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB
  1. 2
      Cargo.lock
  2. 2
      Cargo.toml
  3. 4
      src/utils.rs

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…
Cancel
Save