How to mention link in properites file

2.9k views Asked by At

I have created properties file and configured all the verbiage in the that property file. I need to add the text which will be having the link. For e.g. Text is Please Contact Us. This text i have mention in the property file but I need to add the link on Contact Us.

I have mention the below key in property file

contact_us_link= Please <a href="sample.html">Contact Us</a>

On the form i should get link, but whatever i have added in the properties file same text is displaying on the form. can you please help how can i add the link in the property file.

1

There are 1 answers

0
BalusC On

The <h:outputText> by default escapes HTML entities as part of XSS attack prevention.

If you can guarantee that the value does not contain any user-controlled input such as username and so on, then you can use escape="false" to disable HTML escaping.

<h:outputText value="#{msg['contact_us_link']}" escape="false" />