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

Leopold Mayr leo at sprinkesnirg.de
Sat Mar 7 00:00:01 CET 2009


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, 'ß',$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('ß', 'ß',$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