Permalink
Browse files

Fix #114 Respect additionalChars

  • Loading branch information...
1 parent a68780b commit f1f9bc0b54aa57916fa7d16d4f3bd32af82afa5b @nickl- nickl- committed Feb 22, 2013
@@ -7,9 +7,9 @@
protected function filterWhiteSpaceOption($input)
{
- if (empty($this->additionalChars))
- return preg_replace('/\s/', '', $input);
- return parent::filter($input);
+ if (!empty($this->additionalChars))
+ $input = str_replace(str_split($this->additionalChars), '', $input);
+ return preg_replace('/\s/', '', $input);
}
public function validateClean($input)
@@ -5,7 +5,7 @@
abstract class AbstractFilterRule extends AbstractRule
{
- protected $additionalChars = "";
+ public $additionalChars = "";
abstract protected function validateClean($input);

0 comments on commit f1f9bc0

Please sign in to comment.