/administrator/components/com_virtuemart/helpers/config.php

Started by papacho, February 29, 2012, 22:13:50 PM

Previous topic - Next topic

papacho

on VM 2.0.2
lines:
829      $jsVars .= "vmCartText = '". addslashes( JText::_('COM_VIRTUEMART_MINICART_ADDED_JS'))."' ;\n" ;
830      $jsVars .= "vmCartError = '". addslashes( JText::_('COM_VIRTUEMART_MINICART_ERROR_JS') )."' ;\n" ;

With some configuration of php can generate wrong js code if your JTEXT include ' (italian translation of COM_VIRTUEMART_MINICART_ERROR_JS is "Si รจ verificato un errore durante l'aggiornamento del vostro carrello." and break all script of vmart pages.

right code:
lines:
829      $jsVars .= "vmCartText = '". addcslashes( JText::_('COM_VIRTUEMART_MINICART_ADDED_JS'), "'\")."' ;\n" ;
830      $jsVars .= "vmCartError = '". addcslashes( JText::_('COM_VIRTUEMART_MINICART_ERROR_JS'), "'\" )."' ;\n" ;

--
Agostino Zanutto
SFS.it

papacho

it needed if your php.ini have
magic_quotes_sybase = On

--
Agostino Zanutto
SFS.it