Page 1 of 1

Fb Share Button

PostPosted: 08 Sep 2015, 10:57
by Ashwini
When i update the property description , updated description is not display on the fb share window , it show the old description with html tag

Re: Fb Share Button

PostPosted: 08 Sep 2015, 12:37
by Xpycm
protected\modules\apartments\controllers\MainController.php file

In this file replace
Code: Select all
if ($apartment->getStrByLang("title"))
    
Yii::app()->clientScript->registerMetaTag($apartment->getStrByLang("title"),null,null,array('property'=>'og:title'));

if(
$apartment->getStrByLang("description"))
    
Yii::app()->clientScript->registerMetaTag($apartment->getStrByLang("description"),null,null,array('property'=>'og:description')); 


with
Code: Select all
if ($apartment->getStrByLang("title"))
    
Yii::app()->clientScript->registerMetaTag(strip_tags($apartment->getStrByLang("title")),null,null,array('property'=>'og:title'));

if(
$apartment->getStrByLang("description"))
    
Yii::app()->clientScript->registerMetaTag(strip_tags($apartment->getStrByLang("description")),null,null,array('property'=>'og:description'));