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

Manuel Rego Casasnovas mrego at igalia.com
Mon Mar 9 07:29:48 CET 2009


On Sat, 7 Mar 2009 08:29:58 +0100
"Hauke Hain" <newgrp at googlemail.com> wrote:

> 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

Another option could be use the UTF-8 code for this character, this
should be XML valid. 

For example "&#223;" for "ß" [1]

Bye,
   Rego

[1] http://www.tony-franks.co.uk/UTF-8.htm


More information about the TYPO3-project-formidable mailing list