ImageGrid does not parse reposts correctly #722

Closed
opened 2023-12-12 15:33:53 +00:00 by florian · 0 comments

Describe the bug

On my photopraphy profile I noticed an image which is not rendered in the image grid view.

To Reproduce

Steps to reproduce the behavior:

  1. Visit
    https://snort.social/nprofile1qqsyekqsn88ela0phvx6uw2eujmmuganm72j42xhv6mrmky9k0m4t0spr9mhxue69uhkummnw3ez6am0wfkxgtngxdazu6ns9uq3uamnwvaz7tmwdaehgu3wddhku6twvukkget8wfskze3wdekz7qgnwaehxw309ac82unsd3jhqct89ejhxtch7y69j

  2. Click on the image grid view

  3. Scroll down to the first image row

  4. The third image is not rendered.

Expected behavior

All images are rendered.

Screenshots

Bildschirmfoto 2023-12-12 um 16.23.58.png

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Brave

Additional context

I analyzed the bug and it has to do with this being a REPOST. The content is a serialized JSON string of the original event and is not correctly parsed. The regex parsing the media is then not recognizing double-escaped line breaks \n.

This can be fixed similar to this (quick hack):

Bildschirmfoto 2023-12-12 um 16.24.34

**Describe the bug** On my photopraphy profile I noticed an image which is not rendered in the image grid view. **To Reproduce** Steps to reproduce the behavior: 1. Visit https://snort.social/nprofile1qqsyekqsn88ela0phvx6uw2eujmmuganm72j42xhv6mrmky9k0m4t0spr9mhxue69uhkummnw3ez6am0wfkxgtngxdazu6ns9uq3uamnwvaz7tmwdaehgu3wddhku6twvukkget8wfskze3wdekz7qgnwaehxw309ac82unsd3jhqct89ejhxtch7y69j 2. Click on the image grid view 3. Scroll down to the first image row 4. The third image is not rendered. **Expected behavior** All images are rendered. **Screenshots** ![Bildschirmfoto 2023-12-12 um 16.23.58.png](/attachments/60164ec2-8077-45a2-b1a1-bb5de117d725) **Desktop (please complete the following information):** - OS: MacOS - Browser: Brave **Additional context** I analyzed the bug and it has to do with this being a REPOST. The content is a serialized JSON string of the original event and is not correctly parsed. The regex parsing the media is then not recognizing double-escaped line breaks \\n. This can be fixed similar to this (quick hack): ![Bildschirmfoto 2023-12-12 um 16.24.34](/attachments/3b7d9676-f4aa-407c-a6c9-231f7639aadb)
florian changed title from ImageGrid does not parse reposts correctly to ImageGrid does not parse reposts correctly 2023-12-12 15:35:58 +00:00
Kieran added the
bug
label 2024-04-12 10:21:27 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kieran/snort#722
No description provided.