[TYPO3-project-formidable] How to demask special characters inbeforeInsertion PHP-Code?

Hauke Hain newgrp at googlemail.com
Sat Mar 7 08:29:58 CET 2009


Hi Leopold,

works like a charm.

Thank you for sharing your idea!

Kind regards,
Hauke

"Leopold Mayr" <leo at sprinkesnirg.de> schrieb im Newsbeitrag 
news:mailman.48391.1236380412.2904.typo3-project-formidable at lists.netfielders.de...
Hi,

you could use htmlspecialchars, but that would replace all Umlauts
with entities...

another idea: If you are calling the form from an extension you could
put the ß in a variable like this:

$this->szlig = 'ß';

and call it in your beforeinsertion part like that:

str_replace($this->_oParent->szlig, '&szlig;',$aData);

I am not sure if that works, was just a quick idea

regards

Leo


Am 06.03.2009 um 22:46 schrieb Hauke Hain:

> Hi,
>
> I want to do something like this in a beforeInsertion:
> str_replace('ß', '&szlig;',$aData)
>
> This does not work, because the "ß" is invalid in XML.
>
> The whole php-code is in a <![CDATA[ ]]> so I don't know how to  demask it 
> in
> a way PHP will find and replace the "ß".
>
> Do you have any idea?
>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable



More information about the TYPO3-project-formidable mailing list