Issues

ZF-4510: Zend_Filter_StripSlashes

Issue Type: New Feature Created: 2008-10-07T06:27:25.000+0000 Last Updated: 2012-11-20T20:53:40.000+0000 Status: Closed Fix version(s): Reporter: Kristof Vansant (lupus) Assignee: None Tags: - Zend_Filter

Related issues: Attachments:

Description

\* If you did not receive a copy of the license and are unable to \* obtain it through the world-wide-web, please send an email \* to license@zend.com so we can send you a copy immediately. \* \* @category Zend \* @package Zend\_Filter \* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. () \* @license New BSD License \* @version $Id: $ \*/ /\*\* \* @see Zend\_Filter\_Interface \*/ require\_once 'Zend/Filter/Interface.php'; /\*\* \* @category Zend \* @package Zend\_Filter \* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. () \* @license New BSD License \*/ class Zend\_Filter\_StripSlashes implements Zend\_Filter\_Interface { /** * Defined by Zend_Filter_Interface * * Returns $value without newline control characters * * @param string $value * @return string */ public function filter ($value) { return stripslashes($value); } } ### Comments Posted by Fran├žois Lecluse (openbsdiste) on 2009-03-10T02:10:53.000+0000 filter function should be better with a test of magic quotes... public function filter ($value) { if (get\_magic\_quotes\_gpc ()) { $value = stripslashes ($value); } return $value; } Posted by Ben Scholzen (dasprid) on 2009-03-10T02:14:44.000+0000 Not really. a) magic\_quotes\_gpc should be disabled for ZF projects anyway. b) A filter is not only supposed for values comming from GPC, but also for example values from a web service. Posted by Joe Gornick (jgornick) on 2009-12-29T00:10:39.000+0000 Here's my version:
    

        

Have you found an issue?

See the Overview section for more details.