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

Images are being incorrectly encoded when containing special characters (parenthesis) #87

Open
SikoSoft opened this issue May 10, 2020 · 2 comments

Comments

@SikoSoft
Copy link

I'm noticing that whenever I upload screenshots I take with Windows 10, they appear correctly in the Quilljs editor itself just fine, but quill-delta-to-html improperly tries to encode them, therefor breaking the URLs and not displaying them.

This leads to dead images due to 404 errors.

Windows 10 creates screenshots with a convention of:

Screenshot (2).png

That is, "Screenshot", followed by a space, followed by parenthesis holding an incremented number. This is stored in Quilljs as:

[{"insert":{"image":"https://example.com/image/Screenshot%20(2).png"}}]

The resulting URL output by quill-delta-to-html is:

https://example.com/image/Screenshot%20(2).png

Tested in 0.10.13 and 0.11.0 and seems broken in both.

@SikoSoft
Copy link
Author

If you can confirm this is an issue and it's not just my misunderstanding of how things should work, then I'd be happy to look into finding a fix and creating a PR for it if you'd like.

@volser
Copy link
Collaborator

volser commented Jun 23, 2020

@SikoSoft it does look like bug, PR is welcome with tests

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

No branches or pull requests

2 participants