protected function filterItemName($name)
    {
        $standardChars = '0-9a-zA-Z';
        $allowedSpecialChars = " +'/\\&:,.-{}";
        $pattern = '`[^'.$standardChars.preg_quote($allowedSpecialChars, '/').']`';
        $name = trim(substr(preg_replace($pattern, '', $name), 0, 100));

        return $name;
    }
protected function filterItemName($name)
    {
        $standardChars = '0-9a-zA-Z';
        $allowedSpecialChars = " +'/\\&:,.-{}";
        $pattern = '`[^'.$standardChars.preg_quote($allowedSpecialChars, '/').']`';
        $name = trim(substr(preg_replace($pattern, '', $name), 0, 100));

        return $name;
    }
protected function filterItemName ( $ name ) { $ standardChars = '0-9a-zA-Z' ; $ allowedSpecialChars = " +'/\\&:,.-{}" ; $ pattern = '`[^' . $ standardChars . preg_quote ( $ allowedSpecialChars , '/' ) . ']`' ; $ name = trim ( substr ( preg_replace ( $ pattern , '' , $ name ) , 0 , 100 ) ) ; return $ name ; }
Filters out any characters that SagePay does not support from the item name.

Believe it or not, SagePay actually have separate rules for allowed characters
for item names and discount names, hence the need for two separate methods.

@param string $name
@return string
Filters out any characters that SagePay does not support from the item name .