php - module regex not working -


i add regex validation input given user in opencart 2.0.0.0 module. i'm trying validate inside validate() in newmodule.php.

but cant perfect output preg_match(). after gone through on regex pattern.

and there found < doing serious problem. got value entered user following function.

$this->request->post['variable']; 

i printed value. looks user given. < not matched in preg_match()...

is there opencart doing type of encoding works?

following code

$var = $this->request->post['code_script']; if(preg_match( "/<script>/s", $var )) {     $this->error['code'] = $this->language->get('error_invalid'); } 


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -