Hello Friends,
If you are using JSTL to display HTML data in your application then you can escape HTML 2 ways in JSTL:
1) Using <c:out> tag
2) Using EL Function
Hope this will be useful somewhere.
If you want to use Liferay API then you can simply use
Show/Display HTML tag in jsp
If you are using JSTL to display HTML data in your application then you can escape HTML 2 ways in JSTL:
1) Using <c:out> tag
<c:out value="${specialCharString or HTML}" escapeXml="true"/>
2) Using EL Function
${fn:escapeXml("<i> This is jignesh vachhani")}
Hope this will be useful somewhere.
If you want to use Liferay API then you can simply use
HTMLUtil.escape(String HTMLString)
Show/Display HTML tag in jsp
${fn:escapeXml(fn:replace(fn:replace(fn:replace("<div><p>This is jignesh testing</p></div>",'"','"'),'<','<'),'>','>'))}