Issue Details (XML | Word | Printable)

Key: ZF-2427
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Martin Hujer
Reporter: Karol Babioch
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

Filter dropping new lines

Created: 13/Jan/08 08:08 AM   Updated: 07/Aug/08 06:59 AM   Resolved: 07/Aug/08 06:59 AM
Return to search "Fixed in 1.5.1"
Component/s: Zend_Filter
Affects Version/s: 1.0.3
Fix Version/s: None

Time Tracking:
Original Estimate: 1 hour
Original Estimate - 1 hour
Remaining Estimate: 1 hour
Time Spent - 1 hour Remaining Estimate - 1 hour
Time Spent: 1 hour
Time Spent - 1 hour Remaining Estimate - 1 hour

Issue Links:
Dependency
 

Fix Version Priority: Should Have


 Description  « Hide

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

    }

}


Martin Hujer added a comment - 23/Jan/08 03:09 PM

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



Martin Hujer added a comment - 02/Jul/08 12:33 AM

Filter has been accepted to incubator.


Martin Hujer added a comment - 07/Aug/08 01:44 AM

Filter is in the trunk and in 1.6 release branch.


Ralph Schindler added a comment - 07/Aug/08 06:59 AM

Fixed in ZF-3793.

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