@@ -399,15 +399,15 @@ The methods provided by the parent classes that are available are:
399
399
The second optional parameter lets you run the data through the PHP's
400
400
filters. Pass in the desired filter type as the second parameter::
401
401
402
- $request->getVar('some_data', FILTER_SANITIZE_STRING );
402
+ $request->getVar('some_data', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
403
403
404
404
To return an array of all POST items call without any parameters.
405
405
406
406
To return all POST items and pass them through the filter, set the
407
407
first parameter to null while setting the second parameter to the filter
408
408
you want to use::
409
409
410
- $request->getVar(null, FILTER_SANITIZE_STRING );
410
+ $request->getVar(null, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
411
411
// returns all POST items with string sanitation
412
412
413
413
To return an array of multiple POST parameters, pass all the required keys as an array::
@@ -417,7 +417,7 @@ The methods provided by the parent classes that are available are:
417
417
Same rule applied here, to retrieve the parameters with filtering, set the second parameter to
418
418
the filter type to apply::
419
419
420
- $request->getVar(['field1', 'field2'], FILTER_SANITIZE_STRING );
420
+ $request->getVar(['field1', 'field2'], FILTER_SANITIZE_FULL_SPECIAL_CHARS );
421
421
422
422
.. php :method :: getGet([$index = null[, $filter = null[, $flags = null]]])
423
423
@@ -489,7 +489,7 @@ The methods provided by the parent classes that are available are:
489
489
This method is identical to ``getPost() `` and ``getGet() ``, only it fetches cookie data::
490
490
491
491
$request->getCookie('some_cookie');
492
- $request->getCookie('some_cookie', FILTER_SANITIZE_STRING ); // with filter
492
+ $request->getCookie('some_cookie', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); // with filter
493
493
494
494
To return an array of multiple cookie values, pass all the required keys as an array::
495
495
0 commit comments