Remove trailing spaces from publication title.
Change cleanup to a validate function and add comment.
Merge pull request #6112 from openscholar/6076

Remove trailing spaces from publication title.