Ran into a weird problem with products with quotes in the product names. Turned out to be be in the getNeighborProducts method in the file administrator/components/com_virtuemart/models/product.php.
I had to change line 1492 from
$qm = ' AND '.$orderByName.' '.$op.' "'.$orderByValue.'" ORDER BY '.$orderByName.' '.$direction.' LIMIT 1';
to
$qm = ' AND '.$orderByName.' '.$op.' "'.$this->_db->quote($orderByValue).'" ORDER BY '.$orderByName.' '.$direction.' LIMIT 1';
I was wondering if anyone else has run across this?