Bug #69202 [Opn->Csd]: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used

From: Date: Mon, 09 Mar 2015 09:25:48 +0000
Subject: Bug #69202 [Opn->Csd]: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191263@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69202&edit=1 ID: 69202 Updated by: laruence@php.net Reported by: whatthejeff@php.net Summary: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used -Status: Open +Status: Closed Type: Bug Package: Filter related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Automatic comment on behalf of whatthejeff@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=66a2c528fe29c1af2c98e67acaa4b900cd57496d Log: Fix #69202: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used. Previous Comments: ------------------------------------------------------------------------ [2015-03-09 07:49:44] whatthejeff@php.net Description: ------------ FILTER_FLAG_STRIP_BACKTICK is ignored unless FILTER_FLAG_STRIP_LOW or FILTER_FLAG_STRIP_HIGH is used. Test script: --------------- var_dump(filter_var("`abc`", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK)); var_dump(filter_var("`abc`", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK)); var_dump(filter_var("`abc`", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK)); Expected result: ---------------- string(3) "abc" string(3) "abc" string(3) "abc" Actual result: -------------- string(9) "`abc`" string(3) "abc" string(3) "abc" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69202&edit=1

« previous php.bugs (#191263) next »