Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-71342

Antisamy is deleting the "srcset" attribute of picture tags when is it not a simple link

    Details

      Description

      The srcset attribute in the picture tag can contain different urls for different image resolutions. This is an example:

      <picture>
      <source media="(max-width: 360px)" srcset="images/my_image.jpeg">
      <source media="(min-width: 361px) and (max-width: 1600px)" srcset="images/test1.jpg 1x, images/test1@2x.jpg 2x" >
      <source media="(min-width: 1600px)" srcset="images/142.jpg">
      <img src="images/142.jpg">
      </picture>

      Right now antisamy is deleting the srcset attribute when it does not contain a simple image url, so the result is:

      <picture>
      <source media="(max-width: 360px)" srcset="images/my_image.jpeg">
      <source media="(min-width: 361px) and (max-width: 1600px)" >
      <source media="(min-width: 1600px)" srcset="images/142.jpg">
      <img src="images/142.jpg">
      </picture>

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 33 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 DXP FP13
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  7.0.X EE
                  7.1.X
                  Master