コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

New line added when using context="html" in sightly

Avatar

Level 1

Hi All,

I am facing a really weird issue while trying to use context="html" in sightly.

I have a dialog property like this someproperty : "something<sub>2</sub>something"

HTML is <h1>${properties.someproperty @ context='html'}</h1>

Now, when rendered it adds a new line after the sub html tag. So it comes out as :

something2

something

I have tried few tags other than the sub tag as well and its the same behaviour for them as well.

The same thing works fine with context='unsafe'.

This is for AEM6.2 SP1. I have no idea whats wrong here ? 

1 受け入れられたソリューション

Avatar

正解者
Level 1

Hi All,

I found the problem. Posting the solution in case someone else lands on some similar problem.

The issue was we had an overridden xss config file in our AEM instance from one of the applications (multiple applications are deployed) i.e : /apps/cq/xssprotection/config.xml

Now this config had the following directive : <directive name="formatOutput" value="true"/>

which in turn causes some additional formatting and hence the line break. I changed it to : <directive name="formatOutput" value="false"/>

and everything worked fine. So in case, someone actually faces similar kind of issue, you know where to look 🙂 

元の投稿で解決策を見る

2 返信

Avatar

Level 10

I tried on text field with value : something<sub>2</sub>something

and sightly: <h1>${properties.headline @ context='html'}</h1>

Output:

Works fine

Let me know If I am missing any point

Avatar

正解者
Level 1

Hi All,

I found the problem. Posting the solution in case someone else lands on some similar problem.

The issue was we had an overridden xss config file in our AEM instance from one of the applications (multiple applications are deployed) i.e : /apps/cq/xssprotection/config.xml

Now this config had the following directive : <directive name="formatOutput" value="true"/>

which in turn causes some additional formatting and hence the line break. I changed it to : <directive name="formatOutput" value="false"/>

and everything worked fine. So in case, someone actually faces similar kind of issue, you know where to look 🙂