Hi bakers,
as by the last week i am really getting into CakePHP and enjoy the
easeness of the creation process.

But i have one simple problem.
In every form of the project where users can input data, they can for
example input ( ä,ö,ü, é... and special chars like %§"%/ or whatever)

So i want to write a system function that converts all these chars to
their html form. That is for example a "ä" becomes "ä" etc.

To approach this i already wrote a function that does this exactly:

function htmlizeArray(&$txtArray) {
        if (is_array($txtArray)) {
                foreach ($txtArray as $key => &$val) {
                htmlizeArray($val);
                }
        }
        else {
                $txtArray = htmlentities($txtArray);
        }
}

So now i have to know where to put this function in the source to
access it from every controller that i have made.
Because in the controllers where i anyhow deal with posted form data i
want to htmlize the data.

All the form data from a specific view is in the controller accessed
by $this->data.

So what i want to do now is to htmlize it with

htmlizeArray($this->data);

So maybe you can help me out with it.

Greetings from Germany
worthy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to