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

Fix: download images from posts with emoji-only, extra long, exotic emoji containing titles #5478

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Tarrick
Copy link

@Tarrick Tarrick commented Sep 22, 2023

Tested in browser: Google Chrome 112.0.5615.165

Adjusted checks and replacements for titles of saved images

  1. Emoji-only titles are reduced to 0 and fail to download
  2. Very long titles (Reddit allows at least 300 characters) are over the filesystem limits and prompt a renaming window. I hope that 120 characters is enough
  3. The existing regex only partially removes some emoji (sub-country flags), leaving out stray emoji components
  4. At least in Linux a post title starting with a period prevents the posted image from saving

Examples of images from posts can be downloaded with the fix:

Long title: https://www.reddit.com/r/Steam/comments/116atn0/steam_is_constantly_taking_screenshots_while/
Emoji-only: https://www.reddit.com/r/electricians/comments/xay4ar/_/
Multicharacter emoji: https://www.reddit.com/r/AutumnPorn/comments/16yop1v/castle_combe_wiltshire_england/
Starting with a period: https://www.reddit.com/r/Moescape/comments/18lq49l/by_homutan_original/

@Tarrick Tarrick changed the title Now images from emoji-only or extra long titled posts can be downloaded Fix: download images from posts with emoji-only or extra long titles Oct 16, 2023
@Tarrick Tarrick changed the title Fix: download images from posts with emoji-only or extra long titles Fix: download images from posts with emoji-only, extra long, emoji-component-containing titles Oct 16, 2023
It's more expansive than a simple emoji removal
even though sometimes it leaves behind unprintable characters like
the tags of regional flags. The latter should be cared for by the
following Unicode class escape replacement.
@Tarrick Tarrick changed the title Fix: download images from posts with emoji-only, extra long, emoji-component-containing titles Fix: download images from posts with emoji-only, extra long, exotic emoji containing titles Nov 8, 2023
uwx added a commit to uwx/Reddit-Enhancement-Suite that referenced this pull request Nov 13, 2023
…emoji-only, extra long, exotic emoji containing titles
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.

None yet

1 participant