developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 14 years ago

Closed 14 years ago

#326 closed bug (fixed)

Mis-escaped string in Javascript validation with jForms

Reported by: Uriel C Owned by:
Priority: normal Milestone: Jelix 1.0 RC1
Component: jelix:forms Version: 1.0 beta 3.1
Severity: normal Keywords: jforms javascript escape validation
Cc: Blocked By:
Blocking: Documentation needed:
Hosting Provider: Php version:

Description

English:

The javascript code used to validate a jForm is not correct when the label contains a simple quote and is a locale. The quote is escaped twice instead of once.

Produced code :

jForms.tControl.errRequired='La saisie de "Nom de l
'élément" est obligatoire';

Expected code :

jForms.tControl.errRequired='La saisie de "Nom de l\'élément" est obligatoire';


Français :

Le code javascript de validation d'un jForm n'est pas correct si le label contient un apostrophe et est une locale. L'apostrophe est échappée deux fois au lieu d'une.

Code produit :

jForms.tControl.errRequired='La saisie de "Nom de l
'élément" est obligatoire';

Code correct :

jForms.tControl.errRequired='La saisie de "Nom de l\'élément" est obligatoire';

Change History (1)

comment:1 Changed 14 years ago by laurentj

  • Milestone set to Jelix 1.0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in the trunk and 1.0beta3.x branch.

Note: See TracTickets for help on using tickets.