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

Force HTTP links to HTTPS #1214

Merged
merged 3 commits into from
Sep 4, 2023
Merged

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Sep 4, 2023

Rewrites http links to https,

Android doesn't allow you to load HTTP due to clearText, so we rewrite them as HTTPS

Also fixes this annoying quirk in Linkify that creates HTTP links:

For instance, if you are matching web URLs you would supply the scheme http://. If the pattern matches example.com, which does not have a URL scheme prefix, the supplied scheme will be prepended to create http://example.com when the clickable URL link is created.

Fix #1192

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thx. That's unfortunate that android / markwon can't handle non-https images. I imagine every dev will have to implement this exact same workaround in some way. Thanks android.

@dessalines dessalines merged commit 724aad5 into LemmyNet:main Sep 4, 2023
@MV-GH
Copy link
Collaborator Author

MV-GH commented Sep 4, 2023

It's pure, android limitation not related with markwon. IoS actually introduced this much earlier. And it's still possible to disable "cleartext" but not sure if this is wanted.

@MV-GH MV-GH deleted the change/https_default branch September 4, 2023 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does not load images that use HTTP protocol
2 participants