Memmy-App / memmy

An Apollo inspired open-source iOS and Android client for Lemmy built with React-Native. Find us on the App Store and Google Play!
GNU Affero General Public License v3.0
547 stars 58 forks source link

[Bug]: posted comment with image tags grows infinitely long when rendered. #1082

Open inb4ohnoes opened 7 months ago

inb4ohnoes commented 7 months ago

Check for open issues

Minimal reproducible example

I posted a comment (below) with image tags, and after I posted it, the actual rendered comment in the thread grows infinitely long and eventually crashes the app. The comment is https://lemmy.world/comment/5525169 and seems to render correctly on the web, but not in the app. I’m posting the markdown of the comment itself below:

———

Last time I went back to Taiwan, I made sure to seek out Engrish shirts at one of those clothing markets. Here are a few I found.

a shirt with a picture of a woman printed on it. The english text on the shirt says "Laundry Room ~loads of fun"

a shirt with "orlifornir" printed on it. its clearly meant to say "california"

a shirt with text on it. the text says "clothing" then a bunch of random letters.

Bonus signage picture

a picture of signage in the window of a cafe that says "bread (new line) is the staff of life". its clearly meant to say "staff" instead

Expected Behavior

The rendered posted comment does not grow to become infinitely long and then crash the app

Version

1.1.4.95

App Store or TestFlight?

TestFlight

iOS Version

17.x

Device

iPhone 15 Pro

mratzloff commented 7 months ago

This breaks the app entirely. I run into it regularly.

One image works fine. Two images cause the post to scroll infinitely (with large gaps between images). If you somehow reach the bottom, it will seem to resist and auto-scroll you up. The entire app slows to a crawl and will hang if you switch to another tab.

The same is true for any article copied and pasted as Markdown that contains more than one image.