HTML content in Text fields is escaped after migrating from Liferay DXP 7.3 to 2025.Q1
投稿者
Daniel Martinez Cisneros
knowledge-article-header-disclaimer-how-to
knowledge-article-header-disclaimer
legacy-article
learn-legacy-article-disclaimer-text
Issue
- After migrating from Liferay DXP 7.3 to 2025.Q1, HTML content within web content "Text" fields is no longer interpreted by Freemarker templates using
${field.getData()}
. It is displayed as escaped HTML.
Environment
- Liferay DXP 7.3
- Liferay DXP 2025.Q1+
Resolution
- Use the following Freemarker code to unescape the HTML content from the text field:
${htmlUtil.unescape(fieldName.getData())}
did-this-article-resolve-your-issue