magento2-page-builder icon indicating copy to clipboard operation
magento2-page-builder copied to clipboard

[Issue] Ignore styles which no longer apply

Open m2-assistant[bot] opened this issue 1 year ago • 0 comments
trafficstars

This issue is automatically created based on existing pull request: magento/magento2-page-builder#804: Ignore styles which no longer apply


Description

When PageBuilder initialises, it moves styles from a

Screenshot_2022-03-02_11-17-34

This pull request fixes this bug.

Manual testing scenarios

  1. Use Magento import tool to set a product description (or other Page Builder-enabled attribute) which contains HTML, including some CSS that does not match any elements. (eg, <span>Sample text</span><style>#not-found { color: red; }</style>)
  2. Navigate to this product in the admin.
  3. Witness that Page Builder fails to initialise for this field, and saving the product is impossible (due to a different JavaScript error which stems from the same root cause).
  4. Apply the changes in this pull request.
  5. Witness that Page Builder initialises as expected, and it is possible to save the product.

Checklist

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [ ] All new or changed code is covered with unit/integration tests (if applicable)
  • [x] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • [x] All automated tests passed successfully (all builds are green)

m2-assistant[bot] avatar Feb 13 '24 13:02 m2-assistant[bot]