View Single Post
  #6  
Old 03-14-2016, 02:50 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: html tags in language variables

There are two parts:
- the language variable
- the template file that displays the language variable

If you want to insert the HTML to into the language variable, you should edit the variable.

However, some templates escape HTML in language variables. If this happens to you, you should edit the template too and add ":h" modifier to the code that displays the language variable.

For example, in the attached screenshot I was editing the template that displays the welcome text on the home page. It is not a language variable, but the idea is the same. The text is displayed by this code: "{getDescription():h}". Without the ":h" the template will escape HTML in the text. This is what you should add to the template if you want it to render HTML as it is.

However, please note that this may raise the risk of your site being hacked. Don't render HTML in text that was supplied by regular users.
Attached Thumbnails
Click image for larger version

Name:	1457955843735screensave.png
Views:	221
Size:	49.4 KB
ID:	4503  
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote