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);
}
}
Description
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);
}
}
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.
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.
I will make a proposal in the next days.