From fca4d02907d3051fbff7455d90b416344fffbba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?VERET=20Cl=C3=A9ment?= Date: Mon, 2 Mar 2020 14:08:10 +0100 Subject: [PATCH] Replace & by & in the text of the toot (from the tweet) --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index e91642e..7a833d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -144,6 +144,10 @@ fn build_basic_status(tweet: &Tweet) -> Result> { toot = toot.replace(&decoded_url.0, &decoded_url.1); } + // remove the & and replace it with & + // this is the only entities and/or char that is not available via Twitter API + toot = toot.replace("&", "&"); + Ok(StatusBuilder::new(toot)) }