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 almost 14 years ago. Updated about 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 #1

Updated by Myriam Bernard over 13 years ago

I have the same problem in mailform label with quote ... with Typo3 4.3.5
Does anyone patch the javascript validation ?
Thanks

Actions #2

Updated by Jo Hasenau over 12 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.

Actions #3

Updated by Alexander Opitz over 9 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)?

Actions #4

Updated by Mathias Schreiber over 9 years ago

  • Status changed from Needs Feedback to Closed

dupe of #36950, will continue there

Actions #5

Updated by Björn Jacob almost 9 years ago

  • Category set to 1602
Actions #6

Updated by Björn Jacob about 8 years ago

  • Category changed from 1602 to Form Framework
Actions

Also available in: Atom PDF