public function prepareMetaDescriptionForPersist($meta_description="", $excerpt)
    {
        if ($meta_description == "") return $excerpt;

        $meta_description = html_entity_decode($meta_description);
        $meta_description = strip_tags($meta_description);
        $meta_description = filter_var($meta_description, FILTER_SANITIZE_STRING);

        // remove the encoded blank chars
        $meta_description = str_replace("\xc2\xa0",'',$meta_description);

        $meta_description = trim($meta_description);
        return $meta_description;
    }
public function prepareMetaDescriptionForPersist($meta_description="", $excerpt)
    {
        if ($meta_description == "") return $excerpt;

        $meta_description = html_entity_decode($meta_description);
        $meta_description = strip_tags($meta_description);
        $meta_description = filter_var($meta_description, FILTER_SANITIZE_STRING);

        // remove the encoded blank chars
        $meta_description = str_replace("\xc2\xa0",'',$meta_description);

        $meta_description = trim($meta_description);
        return $meta_description;
    }
public function prepareMetaDescriptionForPersist ( $ meta_description = "" , $ excerpt ) { if ( $ meta_description == "" ) return $ excerpt ; $ meta_description = html_entity_decode ( $ meta_description ) ; $ meta_description = strip_tags ( $ meta_description ) ; $ meta_description = filter_var ( $ meta_description , FILTER_SANITIZE_STRING ) ; // remove the encoded blank chars $ meta_description = str_replace ( "\xc2\xa0" , '' , $ meta_description ) ; $ meta_description = trim ( $ meta_description ) ; return $ meta_description ; }
Transform meta_description for persist.

@param  text  $meta_description
@param  text  $excerpt
@return text
Transform meta_description for persist .