Bug #23317
closedMail form can't execute Javascript validation when single quote are used in field label
0%
Description
Creating a mailform works fine, we have the liberty to use any kind of characters in field label. Unfortunately, if a single quote is used in the label, when submitting the form, a javascript report this error (using Firebug with Firefox):
missing ) after argument list
Here's why:
<form onsubmit="return validateForm('mailform','name,Nom d'utilisateur,email,Email:','','Erreur - ces champs sont obligatoires :','Adresse de courriel non valide')" ...
As you can see, the label is passed as an argument to validateForm function. The single quote used in label "Nom d'utilisateur" breaks the string prematurely.
Result:
the form is sent directly by e-mail and is never validated, this also means we can submit empty forms.
It has been tested and repeated with these Typo3 versions:
4.3.3
4.3.4
4.4.0
(issue imported from #M15307)
Updated by Myriam Bernard about 14 years ago
I have the same problem in mailform label with quote ... with Typo3 4.3.5
Does anyone patch the javascript validation ?
Thanks
Updated by Jo Hasenau about 13 years ago
- Target version changed from 0 to 4.3.14
The bug can be reproduced for double quotes as well. So IMHO quotes must be escaped properly while generating the text for the onclick events and it should be fixed for each supported TYPO3 version.
Updated by Alexander Opitz almost 10 years ago
- Description updated (diff)
- Status changed from New to Needs Feedback
- Target version deleted (
4.3.14) - Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.7)?
Updated by Mathias Schreiber almost 10 years ago
- Status changed from Needs Feedback to Closed
dupe of #36950, will continue there
Updated by Björn Jacob over 8 years ago
- Category changed from 1602 to Form Framework