Removing HTML tags from Magento posts to Facebook -


when post links magento product pages on facebook, html tags in facebook snippets.

i've added meta descriptions both products see here.

image of 2 facebook posts, 1 html showing , meta description.

edit: reread question!

it looks of products have html tags in meta_description, worth having @ that, that's not main issue.

now i've understood issue, take @ great tutorial solve problem setting correct meta data facebook http://www.gofishclientcatchers.com/internet-marketing-blog/development-blog/facebook-meta-tags-for-magento/

the important part relates issue strip_tags php function;

<meta property="og:description" content="<?php echo strip_tags(mage::registry('current_product')->getshortdescription()); ?>" /> 

you use;

<meta property="og:description" content="<?php echo strip_tags(mage::registry('current_product')->getdescription()); ?>" /> 

if not creating short description.

t


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -