[TYPO3-core] RFC: Bug 1030, 277, 1472 possibly 1270

Bernhard Kraft kraftb at kraftb.at
Wed Dec 14 16:16:25 CET 2005


Hello,

This is a CVS patch request.


Type:
Bugfix

Branches:
Head, 3.8

BT reference:
http://bugs.typo3.org/view.php?id=277
http://bugs.typo3.org/view.php?id=1030
http://bugs.typo3.org/view.php?id=1472
possibly:
http://bugs.typo3.org/view.php?id=1270

Description:
The good old unescape(rawurlencode(...)) problem :)

During the zap-the-gremlins bugfixing session I thought long about this problem and
provided a patch in the bugtracker for the first three listed bugs. The patch seemd
to solve the problems good with a little fix from Stansilas Roland our RTE wizard.

Solution:
The problem was solved in such a way that it was taken in concern how browsers parse
HTML/JS.

The old concept of en- de-coding the value was completly dropped.

If JS is enclosed in <script> tags no htmlspecialchars get translated to their entities
when encountered in strings. So you can write anything in a JS string enclosed in <script>
tags and single quotes ' for example except other single quotes ... they must get escaped
by a backslash. Stanislas noted that there are also problems with newlines but not with
utf-8 entities or similar special characters.

The reason for this is that content of <script> tags are of the HTML-DTD type CDATA by default.


I think it is quite tested by some people. The last change I made was in typo3/browse_links.php
on request of Michael Stucki because the page browser has currently the following problem:
1. A site with forceCharset=utf-8
2. You select a record with an umlaut or similar in the db-browser of an db-relation field.
3. you notice that the umlauts are garbled.
4. After saving they are displayed correctly because they are retrieved from db.

to fix this issue of the garbled characters before saving I also applied the requred method
changes in typo3/browse_links.php.


greets,
Bernhard
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utf8_JS_2005-12-13.patch
Type: text/x-patch
Size: 7740 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20051214/7cce8865/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20051214/7cce8865/attachment.pgp 


More information about the TYPO3-team-core mailing list