diff --git a/src/modules/submissions.js b/src/modules/submissions.js index 8b5f9f8a..caad73c0 100644 --- a/src/modules/submissions.js +++ b/src/modules/submissions.js @@ -1704,9 +1704,11 @@ function prefillBiographyDetails() { var titleParts; - // Prefill `LastName, FirstName` for Biography if the page title is two words and + // Prefill `LastName, FirstName` for Biography if the page title is two words + // after removing any trailing parentheticals (likely disambiguation), and // therefore probably safe to asssume in a `FirstName LastName` format. - titleParts = afchSubmission.shortTitle.split( ' ' ); + var title = afchSubmission.shortTitle.replace( / \([\s\S]*?\)$/g, '' ); + titleParts = title.split( ' ' ); if ( titleParts.length === 2 ) { $afch.find( '#subjectName' ).val( titleParts[ 1 ] + ', ' + titleParts[ 0 ] ); }