Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
devaraj s
suppress html tags while displaying content in jsp
January 6, 2013 9:24 PM
Answer

devaraj s

Rank: Regular Member

Posts: 223

Join Date: May 21, 2012

Recent Posts

Hi,

In annoucementEntry model , by using .getContent() method i am fetching a entry news data in jsp. But content showing html tag also like <p>,<div>,&nbsp etc.. i need to suppress these tags , please can anyone help me.

Is i need to use another service or is there is a method in liferay itself to suppress these html tags???

Thanks in advance
Hitoshi Ozawa
RE: suppress html tags while displaying content in jsp
January 6, 2013 9:28 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

I think you need to unescape it using HtmlUtil.unescape()

http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/kernel/util/HtmlUtil.html
devaraj s
RE: suppress html tags while displaying content in jsp
January 6, 2013 9:45 PM
Answer

devaraj s

Rank: Regular Member

Posts: 223

Join Date: May 21, 2012

Recent Posts

Hitoshi Ozawa:
I think you need to unescape it using HtmlUtil.unescape()

http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/kernel/util/HtmlUtil.html


very very thanks hitoshi..
I was strucked since from two days fr this issue.. now its resolved by your suggestion..emoticon

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!