Replace & by & in the text of the toot (from the tweet)

This commit is contained in:
VERET Clément
2020-03-02 14:08:10 +01:00
parent 28547ed430
commit fca4d02907

View File

@@ -144,6 +144,10 @@ fn build_basic_status(tweet: &Tweet) -> Result<StatusBuilder, Box<dyn Error>> {
toot = toot.replace(&decoded_url.0, &decoded_url.1); toot = toot.replace(&decoded_url.0, &decoded_url.1);
} }
// remove the &amp; and replace it with &
// this is the only entities and/or char that is not available via Twitter API
toot = toot.replace("&amp;", "&");
Ok(StatusBuilder::new(toot)) Ok(StatusBuilder::new(toot))
} }