Details
-
Bug
-
Resolution: Fixed
-
High
-
5.2, 5.3.3, 5.4-dev, 5.4.0
-
Pollux Core S5
Description
Please check Links around embedded images produce broken HTML, on eZ Community, for more details.
If you add an image to an eZXMLText attribute and suround the image with a link, a <P> tag will be added in the frontend what not only breaks the formatting but differs from what was been doing in legacy.
Steps to Reproduce
<link href="http://google.com"><embed view="embed" size="medium" custom:offset="0" custom:limit="5" href="ezobject://110" /></link>
- Create an article
- Replicate the code below in eZOE by executing the following actions:
- In the body attribute, insert an image and leave all the options as default.
- Click on the image, add a link and make it point to google (for example).
- Publish the article
- In ezpublish.yml, add "legacy_mode: true" to one of your siteaccesses to make sure the design will be legacy
- Clear the caches
- Open the article in two different siteaccesses: one with "legacy_mode: true", the other standard for the new stack
- Inspect the webpage's code
Legacy siteaccess's code
<code> <div class=""><div class="content-view-embed"> <div class="class-image"> <div class="attribute-image"> <a href="http://google.com" target="_self"> <img src="/var/ezdemo_site/storage/images/media/images/funel/526-1-eng-GB/funel_medium.png" width="200" height="124" style="border: 0px solid ;" alt="funel" title="funel" /> </a> </code>
Symfony siteaccess's code
<div class="attribute-long"> <div class="ezxmltext-field"> <p> <a href="http://google.com" target="_self"> <div> <div class="content-view-embed"> <div class="class-image"> <div class="attribute-image"> <img src="/var/ezdemo_site/storage/images/media/images/funel/526-1-eng-GB/funel_medium.png" width="200" height="124" style="border: 0px solid ;" alt="funel" title="funel" />
As you can see, there's a "<P>" tag surrounding the link in the Symfony stack.
Attachments
Issue Links
- relates to
-
EZP-24529 Doc: BC break in CustomTags converter (XmlText embed rendering)
- Closed
-
EZP-24710 Paragraphs are stripped on the front-end if an XML block is published with the editor disabled
- Closed
- testing discovered
-
EZP-23647 RichText: link params from externally linked embeds are not handled
- Open
-
EZP-23650 Clean up URL resolving in XmlText and RichText external storages
- Open
-
EZP-23646 RichText: to legacy EZXML conversion does not preserve local tmp paragraph namespaces
- Closed
-
EZP-24238 Fatal error when viewing an image with a link
- Closed
-
EZP-23648 Implement UrlService
- Open
- mentioned in
-
Page Loading...