Parsing failure: YouTube-Link #65

Closed
opened 2025-11-29 08:59:17 +00:00 by Sebastian_Berlin · 5 comments
Sebastian_Berlin commented 2025-11-29 08:59:17 +00:00 (Migrated from codeberg.org)

A description of a feed contains a correct url to a youtube video, but instead of ...watch?v=X-EgA_Caxm0 the mastodon post has ...watch?v=X-EgA\_Caxm0. So there is a false \ infront of _. The result: the link is broken.

A description of a [feed](https://bsky.app/profile/did:plc:rlukrdsf3m6cyq7xncsbg5is/rss) contains a correct url to a [youtube video](https://www.youtube.com/watch?v=X-EgA_Caxm0), but instead of ...`watch?v=X-EgA_Caxm0` the mastodon post has ...`watch?v=X-EgA\_Caxm0`. So there is a false `\` infront of `_`. The result: the link is broken.
marvin8 commented 2025-11-29 09:36:37 +00:00 (Migrated from codeberg.org)

Thanks for reporting this... I'll look into this. There is clearly some path escaping happening somewhere.

Thanks for reporting this... I'll look into this. There is clearly some path escaping happening somewhere.
marvin8 commented 2025-12-01 09:28:41 +00:00 (Migrated from codeberg.org)

I am having troubles reproducing the error. When you got the error, did you use a particular post template and/or filters?

I am having troubles reproducing the error. When you got the error, did you use a particular post template and/or filters?
marvin8 commented 2025-12-01 09:50:51 +00:00 (Migrated from codeberg.org)

Never mind... have been able to reproduce it now.

I have noticed that both content_markdown and content_plaintext include the extra escaping. However content_html does not have the extra escaping and includes the correct link. So as a work around you could potentially use content_html in your post_template.

Anyway, I'll have a look if I can do something about the erroneous escaping now.

Never mind... have been able to reproduce it now. I have noticed that both `content_markdown` and `content_plaintext` include the extra escaping. However `content_html` does not have the extra escaping and includes the correct link. So as a work around you could potentially use `content_html` in your post_template. Anyway, I'll have a look if I can do something about the erroneous escaping now.
marvin8 commented 2025-12-01 10:01:38 +00:00 (Migrated from codeberg.org)

I think I got this particular bug sorted. I use a library makdownify to convert html to markdown and plaintext. That library by default escapes _.

I think I got this particular bug sorted. I use a library makdownify to convert html to markdown and plaintext. That library by default escapes `_`.
marvin8 commented 2025-12-18 00:24:46 +00:00 (Migrated from codeberg.org)

Fix in release 3.4.1

Fix in [release 3.4.1](https://codeberg.org/marvinsmastodontools/feed2fedi/releases/tag/3.4.1)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/feed2fedi#65
No description provided.