Issues

ZF-2427: Filter dropping new lines

Description

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


<?php

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);

    }

}

Comments

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.