*** The wcm.io Project is closing down this JIRA Instance in favor of GitHub issues. *** Please use the corresponding GitHub projects to report issues - or the mailing list for general discussion.

Issues

Select view

Select search mode

 

Images compatibility with AEM 6.2

Fixed

Description

Hello,

I tried to use the samples with AEM 6.2. There is a problems with images. Something changed in AEM 6.2 so the way of rendering image markup is broken.

Problem + Context

See this image:

The image tag is rendered as text instead of rendering it as an html element.

I know that the samples readme states support for AEM 6.0 SP1 and AEM 6.1. But I think it would be a good idea to have the samples working also on AEM 6.2

My setup is:

When I install the samples on AEM 6.1 I don't have this problem.

Solving

Images are rendered by

<img data-sly-unwrap data-sly-text="${media.markup @ context='html'}"/>

The context is not respected. Even when I change it to context='unsafe' it does not work. My solution is not to use data-sly-text and replacing said code line by:

${media.markup @ context='html'}

Further informations

The sightly/htl spec states:

The content of the data-sly-text attribute is automatically XSS-protected with the text context, unless stated otherwise:

<p data-sly-text="${'<strong>Bold and Proud</strong>' @ context='html'}"></p> <!--/* outputs: */--> <p><strong>Bold and Proud</strong></p>

This is also not working.

Attachments

1
  • 03 Jan 2017, 12:03 PM

Gliffy Diagrams

Details

Assignee

Reporter

Components

Priority

Created January 3, 2017 at 12:03 PM
Updated January 4, 2017 at 10:28 AM
Resolved January 4, 2017 at 10:28 AM

Activity

Show:

Stefan SeifertJanuary 4, 2017 at 10:28 AM

thanks! - it's merged

Dinh Bao DangJanuary 3, 2017 at 12:31 PM

I created a pull request: https://github.com/wcm-io/wcm-io-samples/pull/1

Tested on AEM 6.2 and AEM 6.1.

Dinh Bao DangJanuary 3, 2017 at 12:05 PM

I am about to prepare a brach for a pull request.