[TYPO3-dev] Characters are badly encoded in form validation JavaScript
Francois Suter
fsuter at cobweb.ch
Fri Mar 27 11:54:48 CET 2009
Hi all,
The problem mentioned in the subject has been reported at least 6 times
to the bug tracker ([1]-[6]). The issue happens in TYPO3's mail form.
Take a site encoded in UTF-8 and create a field with a name such as
"Prénom" or "Übergeek". If that field fails validation (for whatever
reason, e.g. it is required and you left it empty) you will get a JS
alert window with the special characters misinterpreted, because JS
chokes on UTF-8.
Based on some suggestions in [1] I have made a patch which fixes the
issue, but it converts field names explicitly to iso-8859-1 and I
suspect this will not work for non-latin based languages. So I'm not
sure the decoding can really be done server-side. But is there any
solution client-side?
I would be glad to have this discussion and not dispersed among zillions
of bug reports. Hopefully it will help find a solution.
For information I have attached my patch (against trunk), but I really
don't think it's a solution.
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
[1] http://bugs.typo3.org/view.php?id=3527
[2] http://bugs.typo3.org/view.php?id=3562
[3] http://bugs.typo3.org/view.php?id=5615
[4] http://bugs.typo3.org/view.php?id=7936
[5] http://bugs.typo3.org/view.php?id=4162
[6] http://bugs.typo3.org/view.php?id=9148
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug3527.patch
URL: <http://lists.typo3.org/pipermail/typo3-dev/attachments/20090327/d8fd01f9/attachment.txt>
More information about the TYPO3-dev
mailing list