mirror of
https://git.alemi.dev/guestbook.rs.git
synced 2024-12-19 02:54:52 +01:00
fix: decode html before encoding it again in db
This commit is contained in:
parent
0ed8e6649f
commit
707144d169
1 changed files with 3 additions and 3 deletions
|
@ -83,9 +83,9 @@ async fn main() {
|
||||||
for sugg in current_content.iter() {
|
for sugg in current_content.iter() {
|
||||||
tracing::info!("inserting page {:?}", sugg);
|
tracing::info!("inserting page {:?}", sugg);
|
||||||
let insert = PageInsertion {
|
let insert = PageInsertion {
|
||||||
body: sugg.body.clone(),
|
body: html_escape::decode_html_entities(&sugg.body).to_string(),
|
||||||
author: Some(sugg.author.clone()),
|
author: Some(html_escape::decode_html_entities(&sugg.author).to_string()),
|
||||||
contact: sugg.contact.clone(),
|
contact: sugg.contact.clone().map(|c| html_escape::decode_html_entities(&c).to_string()),
|
||||||
public: Some(true),
|
public: Some(true),
|
||||||
date: Some(sugg.date),
|
date: Some(sugg.date),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue