Skip to content

Commit

Permalink
incorporate solution from pkp#1631 about givenname and family names
Browse files Browse the repository at this point in the history
  • Loading branch information
Godoy0722 committed Jul 16, 2024
1 parent bbb4fc8 commit 7063c06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/importexport/csv/CSVImportExportPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function executeCLI($scriptName, &$args) {
// But default to press email address based on press path if not present.
$givenName = $familyName = $emailAddress = null;
$authorString = trim($authorString); // whitespace.
if (preg_match('/^(\w+)(\s+\w+)?\s*(<([^>]+)>)?$/', $authorString, $matches)) {
if (!preg_match('/^([\w.\s]+)\s+([\w\s-]+)?\s*(<([^>]+)>)?$/', $authorString, $matches)) {
$givenName = $matches[1]; // Mandatory
if (count($matches) > 2) {
$familyName = $matches[2];
Expand Down

0 comments on commit 7063c06

Please sign in to comment.