Answer the question
In order to leave comments, you need to log in
Which validator to use for my needs?
We need both a validator and a "cleaner" of the code from extra characters and the like. The tasks are as follows:
Type fields: article title, article description, numeric data, email, password, comments.
would this be enough?
$source = stripslashes( $source );
$source = preg_replace( "#<script#i", "<script", $source );
$source = preg_replace_callback( "#<iframe(.+?)src=['\"](.+?)['\"](.*?)>(.*?)</iframe>#is", array( &$this, 'check_frame'), $source );
$source = str_ireplace( "<iframe", "<iframe", $source );
$source = str_ireplace( "</iframe>", "</iframe>", $source );
$source = str_replace( "<?", "<?", $source );
$source = str_replace( "?>", "?>", $source );
$source = addslashes( $source );
return $source;
Answer the question
In order to leave comments, you need to log in
Not enough.
The simplest option.
https://github.com/bezumkin/Jevix
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question