I would like to put an exception in this function, to release insert of <iframe>
. This function that I use for general forms, decreases the chance of injections, clean spaces and tags however the user wants to insert iframes of youtube, vimeo, gmaps and etc.
I tried to apply this example without success, where am I wrong?
Template:
echo strip_tags($text, '<p><a>');
Function:
//Valida e cria os dados para realizar o cadastro
private function setData() {
$this->Data = array_map('strip_tags', $this->Data);
$this->Data = array_map('trim', $this->Data);
}