Merge pull request #14009 from overleaf/bg-project-name-validation-clone-whitespace

trim whitespace from project name when cloning

GitOrigin-RevId: cb3908a49ad15a9ad4f4e5d490932c4d97a84590
This commit is contained in:
Brian Gough 2023-07-24 16:20:00 +01:00 committed by Copybot
parent c63899834a
commit 5c5649bc8c

View file

@ -50,6 +50,9 @@ async function duplicate(owner, originalProjectId, newProjectName) {
])
segmentation.duplicatedFromProject = originalProjectId
// remove any leading or trailing spaces
newProjectName = newProjectName.trim()
// Now create the new project, cleaning it up on failure if necessary
const newProject = await ProjectCreationHandler.promises.createBlankProject(
owner._id,