VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: papacho on February 29, 2012, 22:13:50 PM

Title: /administrator/components/com_virtuemart/helpers/config.php
Post by: papacho on February 29, 2012, 22:13:50 PM
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
Title: Re: /administrator/components/com_virtuemart/helpers/config.php
Post by: papacho on March 01, 2012, 15:17:31 PM
it needed if your php.ini have
magic_quotes_sybase = On

--
Agostino Zanutto
SFS.it