Paymentsense-DevSupport / magento2-paymentsense-module

Paymentsense Module for Magento 2 Open Source (Community Edition)
GNU General Public License v3.0
3 stars 2 forks source link

hash characters in addresses cause ugly error message for end users #6

Closed johnorourke closed 3 years ago

johnorourke commented 3 years ago

Hi devs, I raised this with support a couple of times this year and you partly solved it by adding character filtering in v2.3.2 - thanks - but you forgot to include the # character. Addresses in Singapore commonly include hash characters.

image

This function in Helper/Data needs altering - we've done it this way:

   public function filterUnsupportedChars($data)
    {
        $data = $this->htmlDecode($data);
        return str_replace(
            ['"', '\'', '\\', '<', '>', '[', ']', '#'],
            ['`', '`',  '/',  '(', ')', '(', ')', '*'],
            $data
        );
    }
johnorourke commented 3 years ago

fixed in 2.4.2