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

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Can Piwik report referrer in real time? -