File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Classes/RobertLemke/Plugin/Blog/Controller Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ public function createAction(NodeInterface $postNode, NodeTemplate $newComment)
61
61
$ this ->throwStatus (400 , 'Your comment was NOT created - it was too short. ' );
62
62
}
63
63
64
+ $ newComment ->setProperty ('text ' , filter_var ($ newComment ->getProperty ('text ' ), FILTER_SANITIZE_STRIPPED ));
65
+ $ newComment ->setProperty ('author ' , filter_var ($ newComment ->getProperty ('author ' ), FILTER_SANITIZE_STRIPPED ));
66
+ $ newComment ->setProperty ('emailAddress ' , filter_var ($ newComment ->getProperty ('emailAddress ' ), FILTER_SANITIZE_STRIPPED ));
67
+
64
68
$ commentNode = $ postNode ->getNode ('comments ' )->createNodeFromTemplate ($ newComment , uniqid ('comment- ' ));
65
69
$ commentNode ->setProperty ('spam ' , false );
66
70
$ commentNode ->setProperty ('datePublished ' , new \DateTime ());
You can’t perform that action at this time.
0 commit comments