You need to sign in to do that
Don't have an account?
How to display HTML content in Visual force page
Hi Everybody,
I have created a VF page ccontroller(i.e a Apex class) which is returning a String Variable containing some HTML content,
But when i am displaying that String variable in VF page , it is showing the output in different format.
Example--
Apex class Code
String HTMLContent='<b>Hello World</b>'
public String getContent(){
return HTMLContent;
}
VisualForce Page Code
{!Content}
It is showing the output like that "<b>Hello World</b>"
But i want to display the Hello World in bold letter(like html format)
When i am execute and view the Page output in FireBug, The String is like that
<b>Hello World </b>
I need help,
Hi,
You have to use <apex:outputText value="{!content}" escape="false" /> on vf.
All Answers
Hi,
You have to use <apex:outputText value="{!content}" escape="false" /> on vf.
Hi,
Wht type of fild type are you using? Rich text or Plain text?
thanks
It works fine, But in security scanner results, it shows as XSS_STORED error,
Can you please help me to overcome this issue