ZF-2427: Filter dropping new lines


A filter dropping new line control characters (\n, \r\n, \r) would be nice, maybe something like that:


require_once 'Zend/Filter/Interface.php';

class Zend_Filter_DropNewLines implements Zend_Filter_Interface

    public function filter($value)

        return str_replace(array("\n", "\n\r", "\r"), '', $value);




I'll submit the proposal on tomorrow afternoon (GMT+1) and code with unit tests.

Filter has been accepted to incubator.

Filter is in the trunk and in 1.6 release branch.

Fixed in ZF-3793.

Resolved at r10539 in trunk. Resolved at r10637 in release 1.6 branch.