Jump to content

preventing HTML showing in short product description


Recommended Posts

  • 4 months later...

Yo J.com

Think I've got a solution for ya.

In the file product-list.tpl look for the bit where the "description_short" is inserted in the <title> tag. Mine was on line 9. It should be something along the lines of:
title="{$product.description_short|truncate:360:'...'|escape:'htmlall':'UTF-8'|strip_tags:'UTF-8'}"

What you need to do is:
1. remove "escape:'htmlall':'UTF-8'|" and
2. change "strip_tags:'UTF-8'" to "strip_tags:false"

So your <title> tage should be:
title="{$product.description_short|truncate:360:'...'|strip_tags:false}"

I haven't a clue what the "strip_tags:'UTF-8'" bit does but looking at the documentation for smarty suggests putting the word "false" and hey presto it worked.

Have a look at this for more information:
http://www.smarty.net/docsv2/en/language.modifiers.tpl

Let me know how you get on.

J

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...