trim entry+comment

This commit is contained in:
_Bastler 2021-10-06 13:19:45 +02:00
parent 06e402a8f2
commit 321eb2865f
2 changed files with 24 additions and 21 deletions

View File

@ -192,6 +192,7 @@ public class CommentController extends BaseController {
comment.setCreated(Instant.now()); comment.setCreated(Instant.now());
comment.setAuthor(getCurrentUsername()); comment.setAuthor(getCurrentUsername());
comment.setText(comment.getText().trim());
comment = commentManager.save(comment); comment = commentManager.save(comment);
Vote vote = new Vote(); Vote vote = new Vote();

View File

@ -273,6 +273,8 @@ public class EntryController extends BaseController {
entry.setCreated(Instant.now()); entry.setCreated(Instant.now());
entry.setAuthor(getCurrentUsername()); entry.setAuthor(getCurrentUsername());
entry.setEntryStatus(EntryStatus.NORMAL); entry.setEntryStatus(EntryStatus.NORMAL);
entry.setTitle(entry.getTitle().trim());
entry.setText(entry.getText().trim());
entry = entryManager.save(entry); entry = entryManager.save(entry);
Vote vote = new Vote(); Vote vote = new Vote();