Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Amethyst fails to display images if there is no space before image URL #1149

Open
dmnyc opened this issue Oct 20, 2024 · 7 comments
Open
Labels
needs more info Further information from developer and/or user is requested

Comments

@dmnyc
Copy link

dmnyc commented Oct 20, 2024

One common reason images fail to load is the syntax created by one client being interpreted incorrectly by another.

In this case, images uploaded by Primal are breaking on Amethyst because the client isn't adding an extra space or line break before the URL.

Most other clients can display these images normally, but Amethyst does not, only showing the image URL instead.

I'm asking for Amethyst to follow what other clients already do: recognize the user intent to display an image, and parse these links correctly.

Examples:

https://primal.net/e/note149zzl7vgaud890s49fgel4rmn7lknv6v6gp3tu2hcc6f2yjqnrcqnxyesa

https://nostrudel.ninja/#/n/nevent1qqs2j3p0lxyw7xnjhc2j55vl63ael0mfkdxdyqc479tuvdy4zfqf3uqpzfmhxue69uhhqatjwpkx2urpvuhx2ucpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3camnwvaz7tmwdaehgu3wvf5hgcm0d9hx2u3wwdhkx6tpdsqs6amnwvaz7tmwdaejumr0dsl7jwdl

https://iris.to/nevent1qqs2j3p0lxyw7xnjhc2j55vl63ael0mfkdxdyqc479tuvdy4zfqf3uqpzfmhxue69uhhqatjwpkx2urpvuhx2ucpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3camnwvaz7tmwdaehgu3wvf5hgcm0d9hx2u3wwdhkx6tpdsqs6amnwvaz7tmwdaejumr0dsl7jwdl

https://coracle.social/nevent1qqs2j3p0lxyw7xnjhc2j55vl63ael0mfkdxdyqc479tuvdy4zfqf3uqpzfmhxue69uhhqatjwpkx2urpvuhx2ucpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3camnwvaz7tmwdaehgu3wvf5hgcm0d9hx2u3wwdhkx6tpdsqs6amnwvaz7tmwdaejumr0dsl7jwdl

image

@vitorpamplona
Copy link
Owner

We could do this. But I would love if the writing client fixed this instead.

I hope we all agree that these posts just make the parser much more difficult than what it could be and makes the job of new clients much harder.

URL schemes should have a space before them. This is not hard.

@dmnyc
Copy link
Author

dmnyc commented Oct 20, 2024

I completely agree with you and I've reported this to Primal as well. Hopefully they will fix that as it is definitely a bug. However, as an interim fix I'd like to see these posts not appear broken on the most popular Android client.

@dmnyc
Copy link
Author

dmnyc commented Oct 20, 2024

Also, Primal implementing a fix would still not solve the existing issue on the note I mentioned, only future ones.

@vitorpamplona
Copy link
Owner

Maybe it shouldn't be solved to force this fix at the writing side so that new clients don't need to worry about this.

@dmnyc
Copy link
Author

dmnyc commented Oct 20, 2024

That kind of punishes and confuses users who see malformed notes on Amethyst (since they look normal on all other major clients) and assume Amethyst is broken. But it's your call.

@vitorpamplona
Copy link
Owner

It also punishes the writer and the writer's app because the image will not show up, links won't work and it just won't attract users to the link, failing to make the point the writer wants.

The writer can always delete the post and write again with the fix. This seems like a better future than requiring every single client to code an advanced parser to figure out what's a link and what's not.

@dmnyc
Copy link
Author

dmnyc commented Oct 20, 2024

This is exactly how I anticipated this conversation would go.

Anyway, I'm an advocate for the user, and don't like the idea of punishing them or forcing them to (attempt to) delete their posts because two clients aren't cooperating.

BTW, I found the same issue on Coracle, submitted it, and it was fixed within a few hours.

@dmnyc dmnyc changed the title [BUG] Amethyst fails to display images if there is no space before "https://" [BUG] Amethyst fails to display images if there is no space before image URLL Oct 20, 2024
@dmnyc dmnyc changed the title [BUG] Amethyst fails to display images if there is no space before image URLL [BUG] Amethyst fails to display images if there is no space before image URL Oct 20, 2024
@davotoula davotoula added the needs more info Further information from developer and/or user is requested label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info Further information from developer and/or user is requested
Projects
None yet
Development

No branches or pull requests

3 participants