Project

General

Profile

Actions

Bug #31336

closed

mailform JS error caused by rawurlencode deleted from previous version

Added by DevEthic about 13 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-10-27
Due date:
% Done:

0%

Estimated time:
0.10 h
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

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;
}


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #16164: Old Gremlin: Mail Form validation: solution of wrong Russian chars in JS pop-upClosedFrancois Suter2006-05-21

Actions
Actions

Also available in: Atom PDF