Images compatibility with AEM 6.2

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

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:

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:

This is also not working.

Activity

Show:
Dinh Bao Dang
January 3, 2017, 12:05 PM

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

Dinh Bao Dang
January 3, 2017, 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.

Stefan Seifert
January 4, 2017, 10:28 AM

thanks! - it's merged

Fixed

Assignee

Unassigned

Reporter

Dinh Bao Dang

Labels

None

Components

Priority

Minor