diff --git a/vendor/magento/module-company/Model/SaveValidator/SanitizeRegion.php b/vendor/magento/module-company/Model/SaveValidator/SanitizeRegion.php new file mode 100644 index 000000000000..4592ab614d06 --- /dev/null +++ b/vendor/magento/module-company/Model/SaveValidator/SanitizeRegion.php @@ -0,0 +1,53 @@ +company->getRegion(); + if (empty($region)) { + return; + } + + $sanitized = trim($this->stripTags->filter($region)); + $this->company->setRegion($sanitized); + } +} diff --git a/vendor/magento/module-company/etc/di.xml b/vendor/magento/module-company/etc/di.xml index cbc695188b7a..710ea704cf8f 100755 --- a/vendor/magento/module-company/etc/di.xml +++ b/vendor/magento/module-company/etc/di.xml @@ -33,6 +33,7 @@ \Magento\Company\Model\SaveValidator\CompanyId \Magento\Company\Model\SaveValidator\RequiredFields \Magento\Company\Model\SaveValidator\SanitizeCompanyName + \Magento\Company\Model\SaveValidator\SanitizeRegion \Magento\Company\Model\SaveValidator\SalesRepresentative \Magento\Company\Model\SaveValidator\CustomerGroup \Magento\Company\Model\SaveValidator\CompanyStatus