News:

Looking for documentation? Take a look on our wiki

Main Menu

Bug in shop.product_description

Started by doorknob, July 15, 2008, 00:01:25 AM

Previous topic - Next topic

doorknob

As with shop.browse, allowing ampersands into the description meta tag causes a potential compliance issue. This can be fixed by changing

// Prepend Product Short Description Meta Tag "description"
if( vmIsJoomla('1.5')) {
$document = JFactory::getDocument();
$document->setDescription( strip_tags( $db_product->f("product_s_desc")));
} else {
$mainframe->prependMetaTag( "description", strip_tags( $db_product->f("product_s_desc")));
}

to
// Prepend Product Short Description Meta Tag "description"
$meta_desc = substr( str_replace(array('&','&'), 'and', strip_tags( $db_product->f('product_s_desc') )), 0, 255);
if( vmIsJoomla('1.5') ) {
$document =& JFactory::getDocument();
$document->setDescription( $meta_desc );
} else {
$mainframe->prependMetaTag( 'description', $meta_desc );
}

Regards
Phil