Bug #31336
closedmailform JS error caused by rawurlencode deleted from previous version
0%
Description
File : typo3/sysext/cms/tslib/content/class.tslib_content_form.php
if $fieldlist contains some accentued characters or special characters, the JS validation fails due to a JS ERROR (detected by IE but not by Firefox, chrome... even if result is the same).
resolution : rawurlencode must be used like in the typo3 4.2.8 version !
current code :
// Adding evaluation based on settings:
switch ((string) $modeParameters0) {
case 'EREG' :
$fieldlist[] = '_EREG';
$fieldlist[] = $modeParameters1;
$fieldlist[] = $modeParameters2;
$fieldlist[] = $confData['fieldname'];
$fieldlist[] = $confData['label'];
$confData['required'] = 1;
break;
case 'EMAIL' :
$fieldlist[] = '_EMAIL';
$fieldlist[] = $confData['fieldname'];
$fieldlist[] = $confData['label'];
$confData['required'] = 1;
break;
default :
if ($confData['required']) {
$fieldlist[] = $confData['fieldname'];
$fieldlist[] = $confData['label'];
}
break;
}
------------------------------------
code that works in 4.2.8 version :
------------------------------------
// Adding evaluation based on settings:
switch ((string)$modeParameters0) {
case 'EREG':
$fieldlist[] = '_EREG';
$fieldlist[] = rawurlencode($modeParameters1);
$fieldlist[] = rawurlencode($modeParameters2);
$fieldlist[] = rawurlencode($confData['fieldname']);
$fieldlist[] = rawurlencode($confData['label']);
$confData['required'] = 1;
break;
case 'EMAIL':
$fieldlist[] = '_EMAIL';
$fieldlist[] = rawurlencode($confData['fieldname']);
$fieldlist[] = rawurlencode($confData['label']);
$confData['required'] = 1;
break;
default:
if ($confData['required']) {
$fieldlist[] = rawurlencode($confData['fieldname']);
$fieldlist[] = rawurlencode($confData['label']);
}
break;
}