Skip to content

[Support] Page builder content is broken when html element contains script tags with html template#521

Merged
omiroshnichenko merged 3 commits into
1.3-developfrom
magento-mpi-MC-34846
Jun 11, 2020
Merged

[Support] Page builder content is broken when html element contains script tags with html template#521
omiroshnichenko merged 3 commits into
1.3-developfrom
magento-mpi-MC-34846

Conversation

@bubasuma
Copy link
Copy Markdown
Contributor

@bubasuma bubasuma commented Jun 5, 2020

Page builder content is broken when html element contains script tags with html template

Description (*)

DOMDocument::loadHTML() removes closing tags inside script tags and results in broken html template script
https://bugs.php.net/bug.php?id=52012

Bug

  • MC-34846 [Page Builder] "Order by SKU" Widget is displayed incorrectly on the Storefront

Manual testing scenarios (*)

  1. Go to admin panel. Main menu - Content - Blocks.
  2. Add a new block - Edit Block title and identifier.
  3. Add HTML code element using Pagebuilder Drag&Drop into content area.
  4. Click edit html code icon on a new element and insert a widget 'Order By SKU'.
  5. Settings for widget :
    • Template - Order by SKU Template
    • Display a link .. - Yes
    • Link Text - Load a list of SKUs
  6. Click on button - Insert widget
  7. Save the new block.
  8. We are going to render the cms block on shopping cart page.
  9. Go to Admin Panel - Content - Widgets - click Add Widget button.
  10. On widget edit page select :
    • Type - Cms Static Block
    • Design Theme - Magento Luma
    • Click Continue button
  11. Enter data on Storefront Properties page 
    • Widget Title - order by sku
    • Assign to Store Views - All Store Views
    • Layout updates
    • Click Add Layout Update
    • Display on - Specified page
    • Page - Shopping cart
    • Container - Main Content Area
  12. On Widget Options tab
    • Select CMS block created on steps 2-8.
  13. Click Save button.

🔴 Actual Result

Screen Shot 2020-06-05 at 6 27 02 PM

🟢 Expected Result

Screen Shot 2020-06-05 at 6 25 52 PM

Builds

Checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@bubasuma
Copy link
Copy Markdown
Contributor Author

bubasuma commented Jun 5, 2020

@magento run all tests against 2.3-develop

…ly on the Storefront

- Fix page builder content is broken when html element contains script tags with html template
@bubasuma bubasuma force-pushed the magento-mpi-MC-34846 branch from 89e6e24 to 1369bad Compare June 8, 2020 14:58
@bubasuma
Copy link
Copy Markdown
Contributor Author

bubasuma commented Jun 8, 2020

@magento run Unit-Tests 2.3-develop

@bubasuma
Copy link
Copy Markdown
Contributor Author

bubasuma commented Jun 8, 2020

@magento run Unit-Tests against 2.3-develop

@bubasuma
Copy link
Copy Markdown
Contributor Author

bubasuma commented Jun 8, 2020

@magento run Unit Tests against 2.3-develop

@bubasuma
Copy link
Copy Markdown
Contributor Author

bubasuma commented Jun 8, 2020

@magento run Magento Health Index against 2.3-develop

@bubasuma
Copy link
Copy Markdown
Contributor Author

bubasuma commented Jun 8, 2020

@magento run Static Tests against 2.3-develop

@omiroshnichenko
Copy link
Copy Markdown
Contributor

See comment #523 (review)

…ly on the Storefront

- Mask only "x-magento-template" scripts
@omiroshnichenko
Copy link
Copy Markdown
Contributor

@bubasuma Please, create All User Requested Tests Build with Page Builder enabled

@bubasuma
Copy link
Copy Markdown
Contributor Author

bubasuma commented Jun 10, 2020

@omiroshnichenko omiroshnichenko merged commit 9634091 into 1.3-develop Jun 11, 2020
@omiroshnichenko omiroshnichenko deleted the magento-mpi-MC-34846 branch July 20, 2020 17:56
magento-devops-reposync-svc pushed a commit that referenced this pull request May 13, 2026
…-09042026

Cia pre release develop sync 09042026
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.

2 participants