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 for incorrectly escapeHtml'd JSON in commit b8f78cc6 #19422

Merged
merged 2 commits into from Nov 29, 2018

Conversation

insanityinside
Copy link

@insanityinside insanityinside commented Nov 27, 2018

This commit fixes a bug where the resize JSON configuration was incorrectly being HTML encoded before being output, preventing CMS image uploads in the admin due to the Javascript failing on the encoded single quote -> ' in the code. Relates to new resize code introduced in MAGETWO-94988, commit b8f78cc.

@magento-engcom-team
Copy link
Contributor

Hi @insanityinside. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@orlangur orlangur self-assigned this Nov 28, 2018
Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @insanityinside,

Please add annotation similar to https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml#L156 and add more details on steps to reproduce to reveal an issue.

@insanityinside
Copy link
Author

Changes made as requested.

Loading the upload image page on the latest 2.2-develop from the CMS page editor results in a javascript error in the console, due to the JSON being incorrectly encoded and being unable to be parsed. Attempting to add an image will trigger the error as soon as the AJAX page tries to load.

@magento-engcom-team magento-engcom-team added this to the Release: 2.2.8 milestone Nov 28, 2018
@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-3582 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @insanityinside. Thank you for your contribution.
We will aim to release these changes as part of 2.2.8.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

@insanityinside insanityinside deleted the 2.2-cms-upload-fix branch November 29, 2018 10:42
@insanityinside
Copy link
Author

Forward port unnecessary, code is already fixed in 2.3-develop.

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

Successfully merging this pull request may close these issues.

None yet

3 participants