trim entry+comment

This commit is contained in:
2021-10-06 13:19:45 +02:00
parent 06e402a8f2
commit 321eb2865f
2 changed files with 24 additions and 21 deletions
@@ -192,6 +192,7 @@ public class CommentController extends BaseController {
comment.setCreated(Instant.now());
comment.setAuthor(getCurrentUsername());
comment.setText(comment.getText().trim());
comment = commentManager.save(comment);
Vote vote = new Vote();
@@ -273,6 +273,8 @@ public class EntryController extends BaseController {
entry.setCreated(Instant.now());
entry.setAuthor(getCurrentUsername());
entry.setEntryStatus(EntryStatus.NORMAL);
entry.setTitle(entry.getTitle().trim());
entry.setText(entry.getText().trim());
entry = entryManager.save(entry);
Vote vote = new Vote();