twitter-archive-parser icon indicating copy to clipboard operation
twitter-archive-parser copied to clipboard

Bug: markdown inside tweets is not escaped

Open twoscomplement opened this issue 2 years ago • 3 comments

Consider https://twitter.com/twoscomplement/status/1580380783767756801 - note the text __VA_ARGS__

The tweet body text is copied verbatim by parser.py, resulting in VA_ARGS when the markdown is rendered image

twoscomplement avatar Nov 13 '22 22:11 twoscomplement

Another example:

We previously made a smaller version out of cardboard: https://mobile.twitter.com/_tim_hutton_/status/1010638114417766400

The underscores break the URL:

image

timhutton avatar Nov 14 '22 13:11 timhutton

I haven't actually tried it yet, but here's at least a hint to start with:
This could probably be solved by using something similar to this example (@lenaschimmel did a quick research and found this) somewhere inside the convert_tweet method.

flauschzelle avatar Nov 19 '22 14:11 flauschzelle

Related, but only for the user handles of DMs: #117

flauschzelle avatar Nov 24 '22 01:11 flauschzelle