dmatthew / magento2-widget-parameters

Useful widget types for Magento 2 like image selector and wysiwyg text editor.
MIT License
56 stars 24 forks source link

HTML from a WYSIWYG content cannot be displayed #13

Open OvalMedia opened 4 years ago

OvalMedia commented 4 years ago

Using the WYSIWYG field generates HTML (obviously).

This is a shortcode generated:

{{widget type="My\Module\Block\Widget\Wysiwyg" body_text="<p style="text-align: center;"><em>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</em></p>"}}

Since the content is not escaped in any way it cannot be displayed properly as the parser cuts off at the first " (style="...).

How can I tell this element to store the resulting content escaped or somewhat encoded (base64, html entites....)?

Thank you

tartreau commented 3 years ago

Did you find the answer ? I've got the same issue !