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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -