1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-12-04 18:56:44 +01:00
archivr/crates
TheGeneralist f41697c800 fix(twitter): use Cow for tweet metadata to deserialize escaped JSON strings
When tweet text contains JSON escape sequences (such as newlines \n,
escaped quotes \", or unicode escapes), serde_json cannot borrow a &str
slice from the input string because unescaping requires allocation.
Deserializing to borrowed &str returned an error which caused
tweet_metadata_from_json to silently fall back to Default::default(),
producing titles like "Thread by @unknown" or "Tweet — @unknown".

Using std::borrow::Cow<\x27a, str> allows serde_json to borrow unescaped
slices with zero allocation while cleanly allocating for strings with
escaped characters.
2026-10-21 20:45:42 +02:00
..
archivr-cli feat: remove PDF from export (HTML and Markdown only) 2026-10-12 21:40:09 +02:00
archivr-core fix(twitter): use Cow for tweet metadata to deserialize escaped JSON strings 2026-10-21 20:45:42 +02:00
archivr-server feat: capture browser cookies and localStorage from extension (#44) 2026-10-14 16:51:15 +02:00