ported from "CodeIgniter"
Автор: EllisLab Dev Team
Автор: Lars Moelleken
Пример #1
0
 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;
 }
Пример #2
0
 /**
  * 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);
 }