내 커뮤니티 업적 표시줄을 확대합니다.

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

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Conversion of & to &

Avatar

Level 2

Hi,

We are using HTL for component development.

The title field is populated dynamically and contains the character '&': example : Audio & Video.

When we "View page source"  & is converted to & due to html encoding. example : Audio & Video

We want to avoid this encoding and & should be displayed as & itself.

context="unsafe" and context="scriptToken" avoids encoding and helps to resolve the issue, but these are not recommended and accepted by the client.

We have tried using StringUtils,encode(), StringUtils.escape() methods but it did not work as expected

Are there any other alternatives through which this can be achieved. Any pointers would help

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 6

use <div>${properties.text @ context='html'}</div>

context='html' will convert &amp; to & on page

원본 게시물의 솔루션 보기

4 답변 개

Avatar

Employee

Normally character like & < > are always encoded, why is this not the case at your components?

Avatar

Level 2

Hi Feike,

On the page the value is displayed correctly.

Its only when we try viewing page source code it is converted to '&amp;'

We want '&' to display as '&' only when we view page source as well.

Avatar

Employee

This is what I would expect.

Avatar

정확한 답변 작성자:
Level 6

use <div>${properties.text @ context='html'}</div>

context='html' will convert &amp; to & on page