filter() публичный статический Метод

Ensures CRLF header injection vectors are filtered. Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal tabs are allowed in values; header continuations MUST consist of a single CRLF sequence followed by a space or horizontal tab. This method filters any values not allowed from the string, and is lossy.
См. также: http://en.wikipedia.org/wiki/HTTP_response_splitting
public static filter ( string $value ) : string
$value string
Результат string
Пример #1
0
 /**
  * @dataProvider getFilterValues
  * @group ZF2015-04
  */
 public function testFiltersValuesPerRfc7230($value, $expected)
 {
     $this->assertEquals($expected, HeaderSecurity::filter($value));
 }