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

Render encoded image links #498

Merged
merged 4 commits into from Mar 13, 2022
Merged

Render encoded image links #498

merged 4 commits into from Mar 13, 2022

Conversation

paw-lu
Copy link
Owner

@paw-lu paw-lu commented Mar 13, 2022

Some notebooks can have some messy HTML.

<img src="data:image/png;base64,iVBOR…/>

Where the entire base64 encoded image is in the src. nbpreview previously treated this as a filename, which led to exceptions being raised because it's very long.

With this change nbpreview not properly decodes these kinds of images, and additionally has some guards to catch issues like this and fail gently.

Fixes #496

@paw-lu paw-lu added bug Something isn't working enhancement New feature or request labels Mar 13, 2022
@paw-lu paw-lu force-pushed the encoded-image-link branch 2 times, most recently from f789001 to bfba4b9 Compare March 13, 2022 16:42
@paw-lu paw-lu enabled auto-merge March 13, 2022 16:45
@paw-lu paw-lu force-pushed the encoded-image-link branch 4 times, most recently from 5786cc0 to bafe621 Compare March 13, 2022 17:44
@paw-lu paw-lu merged commit eb11cc4 into main Mar 13, 2022
@paw-lu paw-lu deleted the encoded-image-link branch March 13, 2022 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File name too long
1 participant