History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ZF-2531
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Thomas Weidner
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 stripping all repeated spaces

Created: 30/Jan/08 03:55 PM   Updated: 30/Apr/09 12:40 PM
Component/s: Zend_Filter
Affects Version/s: 1.0.3
Fix Version/s: Next Minor Release

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

 Public Fields   Internal Project Management Fields   
Tags:
Participants: Karol Babioch, Thomas Weidner and Wil Sinclair
Fix Version Priority: Nice to Have


 Description  « Hide
A filter stripping all repeated spaces would be useful. Html for example ignores all repeated spaces an just the first is shown.

Such a filter could look like that:

<?php

require_once 'Zend/Filter/Interface.php';

class Zend_Filter_StripRepeatedSpaces implements Zend_Filter_Interface
{

    public function filter($value)
    {

        return preg_replace('/ +/', ' ', $value);

    }

}


 All   Comments   Work Log   Change History   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Karol Babioch - 30/Jan/08 04:39 PM
I think a filter called "Zend_Filter_StripSpaces" will be much more senseful. In the constructor you can set whether all spaces or just the repeated ones will be removed.

I will make a proposal in the next days.



Wil Sinclair - 18/Apr/08 01:11 PM
This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.