1
I would like to put an exception in this function, to release insertion of <iframe>
. This function that I use for general Forms, decreases the chance of injections, clears the spaces and tags but the user wants to insert youtube iframes, Vimeo, Gmaps and etc.
I tried to apply this example without success, where I am missing?
Model:
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);
}
The problem is to pass the argument on
array_map()
?– rray
the problem is declaring which tags I want to release when applying striptags
– Bruno Depieri Barduchi
wanted to do something like this, but it gives clear error, wanted to know how to apply correctly. $this->Data = array_map('strip_tags', $this->Data,'<iframe>');
– Bruno Depieri Barduchi