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

"%25" exported in filenames instead of '%'. This causes errors for any asset files that contain '%' in the intial URL. #1324

Closed
4 of 6 tasks
bickford opened this issue Dec 10, 2024 · 1 comment · Fixed by #1351

Comments

@bickford
Copy link

bickford commented Dec 10, 2024

Version

2.44.0

Flavor

GUI (Graphical User Interface)

Platform

Win10x64

Export format

HTML

Steps to reproduce

  • Put this Tenor gif into any chat (should be able to find it in the inbuilt GIF feature by searching for its tags in Tenor): https://tenor.com/view/%D1%81%D0%BF%D0%B0%D1%81%D0%B8%D0%B1%D0%BE%D1%81%D0%B0%D0%BD%D1%8F-thank-you-robert-redford-smile-nodding-gif-17804083
  • Export a chat that contains this GIF
  • Export should succeed, but a blank section is noted where the Tenor MP4 should be located on the exported chat webpage.
  • Right-clicking on the blank space in the webpage, and select 'Open video in new tab' (Firefox current version, similar wording other browsers) shows URL: file:///((export path))/((assets directory))/%25D1%2581%25D0%25BF%25D0%25B0%25D1%2581%252-F6C92.mp4
  • Checking assets export directory you should see that the file was successfully downloaded with expected filename as above.
  • Looking at the web browser error message though, a message similar to the following:
File not found

Firefox can’t find the file at ((export path))/((assets directory))/**%D1%81%D0%BF%D0%B0%D1%81%2-F6C92.mp4**.

    Check the file name for capitalization or other typing errors.
    Check to see if the file was moved, renamed or deleted.

image

Details

I think the issue is that the web browser is interpreting each '%25' in the URL for the filename as a '%' character as is normal for URL intepretation, and then it ends up trying to find the wrong filename.

Eg:
Original filename:
%D1%81%D0%BF%D0%B0%D1%81%D0%B8%D0%B1%D0%BE%D1%81%D0%B0%D0%BD%D1%8F-thank-you-robert-redford-smile-nodding-gif-17804083.mp4
Becomes this when downloaded:
%25D1%2581%25D0%25BF%25D0%25B0%25D1%2581%252-F6C92.mp4
Becomes this when viewed via HTTP:
%D1%81%D0%BF%D0%B0%D1%81%2-F6C92.mp4 (does not exist)

To fix I think you would need to ensure any '%25' characters in filenames are translated to '%' before writing the file out to disk?

This would cause issues for any other HTTP ASCII codes too if they're not being filtered before being written to disk, full list here:
https://www.w3schools.com/tags//ref_urlencode.asp

Thanks for your great app!

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that this bug is reproducible on the latest version of the application
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project
  • I have not read any of the above and just checked all the boxes to submit the issue
@Tyrrrz
Copy link
Owner

Tyrrrz commented Mar 9, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants