note 118186 added to filter.filters.sanitize
| From: | Anonymous | Date: | Thu, 22 Oct 2015 15:56:06 +0000 |
| Subject: | note 118186 added to filter.filters.sanitize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204004@lists.php.net to get a copy of this message | ||
FILTER_SANITIZE_STRING doesn't behavior the same as strip_tags function. strip_tags allows
less than symbol inferred from context, FILTER_SANITIZE_STRING strips regardless.
<?php
$smaller = "not a tag < 5";
echo strip_tags($smaller); // -> not a tag < 5
echo filter_var ( $smaller, FILTER_SANITIZE_STRING); // -> not a tag
?>
----
Server IP: 72.52.91.14
Probable Submitter: 173.161.189.57
----
Manual Page -- http://php.net/manual/en/filter.filters.sanitize.php
Edit -- https://master.php.net/note/edit/118186
Del: integrated -- https://master.php.net/note/delete/118186/integrated
Del: useless -- https://master.php.net/note/delete/118186/useless
Del: bad code -- https://master.php.net/note/delete/118186/bad+code
Del: spam -- https://master.php.net/note/delete/118186/spam
Del: non-english -- https://master.php.net/note/delete/118186/non-english
Del: in docs -- https://master.php.net/note/delete/118186/in+docs
Del: other reasons-- https://master.php.net/note/delete/118186
Reject -- https://master.php.net/note/reject/118186
Search -- https://master.php.net/manage/user-notes.php