diff --git a/includes/Checker/Checks/Trademarks_Check.php b/includes/Checker/Checks/Trademarks_Check.php index 8e9180e4b..0c4a2650b 100644 --- a/includes/Checker/Checks/Trademarks_Check.php +++ b/includes/Checker/Checks/Trademarks_Check.php @@ -256,7 +256,7 @@ private function check_for_name_in_readme( Check_Result $result, array $files ) return; } - $name = $matches[1]; + $name = trim( $matches[1] ); try { $this->validate_name_has_no_trademarks( $name ); diff --git a/tests/phpunit/tests/Checker/Checks/Trademarks_Check_Tests.php b/tests/phpunit/tests/Checker/Checks/Trademarks_Check_Tests.php index 018788895..ad7a92a7a 100644 --- a/tests/phpunit/tests/Checker/Checks/Trademarks_Check_Tests.php +++ b/tests/phpunit/tests/Checker/Checks/Trademarks_Check_Tests.php @@ -55,7 +55,7 @@ public function data_trademarks_check() { Trademarks_Check::TYPE_README, 'test-trademarks-plugin-readme-errors/load.php', 'readme.txt', - 'The plugin name includes a restricted term. Your chosen plugin name - " Test Plugin with readme " - contains the restricted term "plugin" which cannot be used at all in your plugin name.', + 'The plugin name includes a restricted term. Your chosen plugin name - "Test Plugin with readme" - contains the restricted term "plugin" which cannot be used at all in your plugin name.', ), 'Plugin header - Test Trademarks Plugin Header Name Errors' => array( Trademarks_Check::TYPE_NAME,