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

:bug: Fix base64 encoded image viewing in package README files. #1087

Merged
merged 2 commits into from Oct 18, 2018

Conversation

Projects
None yet
2 participants
@maralv
Contributor

maralv commented Oct 18, 2018

The sanitize function merges the package path with the image source,
a check is needed for base64 encoded images, to ensure they are properly
shown in the package readme view.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

This PR adds a regex based check for base64 encoded images in package README files, with a similar syntax as surrounding checks.

Alternate Designs

None.

Benefits

Prior to this change, all base64 images in README files would break, when viewed from the settings view.

Possible Drawbacks

None.

Applicable Issues

Fixes #1030

maralv
🐛 Fix base64 encoded image viewing in package README files.
The sanitize function merges the package path with the image source,
a check is needed for base64 encoded images, to ensure they are properly
shown in the package readme view.
@maralv

This comment has been minimized.

Contributor

maralv commented Oct 18, 2018

The failed test is in ATOM_CHANNEL=beta and unrelated to this pull request.

@50Wliu

This comment has been minimized.

Member

50Wliu commented Oct 18, 2018

Thanks for your submission!

We require automated tests for all pull requests that include new or changed code. We do this so that we can ensure that we don't accidentally break your shiny new code the next time we or some other contributor submits a change. If you need help writing automated tests for Atom, check out Discuss, the official Atom and Electron message board or join the Atom Slack team. There are a bunch of helpful community members that should be willing to point you in the right direction.

Add automated tests for base64 encoded images.
The example image is a base64 encoded, fully transparent 1x1 GIF pixel.

@50Wliu 50Wliu merged commit 2ba093f into atom:master Oct 18, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@50Wliu

This comment has been minimized.

Member

50Wliu commented Oct 18, 2018

Thanks!

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