Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
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
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
use <div>${properties.text @ context='html'}</div>
context='html' will convert & to & on page
Zugriffe
Antworten
Likes gesamt
Normally character like & < > are always encoded, why is this not the case at your components?
Zugriffe
Antworten
Likes gesamt
Hi Feike,
On the page the value is displayed correctly.
Its only when we try viewing page source code it is converted to '&'
We want '&' to display as '&' only when we view page source as well.
Zugriffe
Antworten
Likes gesamt
This is what I would expect.
Zugriffe
Antworten
Likes gesamt
use <div>${properties.text @ context='html'}</div>
context='html' will convert & to & on page
Zugriffe
Antworten
Likes gesamt
Zugriffe
Likes
Antworten