Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Posting empty comments | /vanilla/post/comment

Hello, where can I find the PHP script that makes some checks on a comment body?
I need it because, it is possible to post empty comment in my forum. ( I am using plugin WYSIWYG (CLEditor) )
I don't want to implement the check "if the comment is empty" in a JavaScript, because it is easily bypassable.

Comments

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff
    edited May 2013

    WYSIWYG editors (CLEditor in particular) leave HTML fragments behind (eg. <br> and empty <p> tags) so simply disabling CLEditor and using Button Bar instead will solve the problem. Point being that posting an empty body is not possible, but posting a body with only, say, a non-breaking space or a line break is.

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • Well.. okay.. Thank you for the suggestion.
    But just in case, where is the default check "if the comment is empty" is located?

Sign In or Register to comment.