Project

General

Profile

Actions

Bug #23317

closed

Mail form can't execute Javascript validation when single quote are used in field label

Added by Mathieu Bilodeau over 14 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2010-07-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #36950: new form content element: input of OPTIONS >> ATTRIBUTES PROPERTIES >> NAME for a specific form element should be validatedClosed2012-05-08

Actions
Actions

Also available in: Atom PDF