public function post(Request $request, AntiXSS $xss, \Swift_Mailer $mailer, array $vars) { $name = $xss->xss_clean($request->request->get('name')); $mail = $xss->xss_clean($request->request->get('mail')); $message = $xss->xss_clean($request->request->get('message')); $return = ['name' => $name, 'mail' => $mail, 'message' => $message]; return $return; }
/** * remove xss from html * * @return Stringy */ public function removeXss() { static $antiXss = null; if ($antiXss === null) { $antiXss = new AntiXSS(); } $str = $antiXss->xss_clean($this->str); return static::create($str, $this->encoding); }