[TYPO3-core] RFC #8264: "+" (plus) signs are replaced by spaces

Benjamin Mack benni at typo3.org
Tue Jun 10 17:27:20 CEST 2008


Hey Tobias,

commited the cleaned up patch to 4.2 (rev. #3791) and trunk (#3792)
after +1 in reading and testing!

Thanks,
benni.
-SDG-

Tobias Liebig wrote:
> This is an SVN patch request.
> 
> 
> Type: Bugfix
> 
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=8264
> 
> 
> Branches:
> 4.2, Trunk
> 
> 
> Problem/Background:
> Posts in Ajax.requests (prototype) are always UTF-8 encoded, but they 
> are expected to be encoded like the backend is (iso-8859-1 by default).
> This caused special chars to get mixed up (happes in shortcut menu and 
> in the t3editor)
> 
> I an earlier patch i introduce a workaround for this charset problem. In 
> this patch i had replaced the javascript function "encodeURIcomponent" 
> by "escape". Now the special char gets encoded correctly, but all "+" 
> became " " (space) when sending them by Ajax.request to the server. 
> (This is because a "+" means " " (space) in url encoding, and "escape" 
> does not handle this)
> 
> Because of this issue the t3editor now uses the new 
> "ajax.php/class.typo3ajax.php" instead of sending the content directly 
> to tstemplate/ts/index.php. So the workaround "encodeURIcomponent = 
> escape" should be removed from the javascript.
> With the patch for #8591 the "ajax.php/class.typo3ajax.php" detects the 
> content charset of the ajax request and convert all post/get to the 
> charset used for the backend.
> 
> 
> 
> How to test/some test cases:
> open a setup or constants in the t3editor
> type some code
> use some special chars and +
> save the code by clicking the save icon or hit CTRL-S
> scroll down and click "edit whole record"
> check if all special chars are ok
> 
> the saving procedure is completely rewritten, so you should test also:
> if saving works correct if you have more than one template on one page 
> (mutible +ext templates)
> saving different templates on different pages
> disable the t3editor and save the code (e.g. with special chars again)
> 
> 
> 
> Note:
> This patch really depends on the patch for #8591
> Do not test/commit without it.
> 


More information about the TYPO3-team-core mailing list