Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 14

G_Mlucmcu_hqsandino +10 guests

Preventing HTML in comments

Is there a simple means of disallowing HTML in comments, or at least restricting it to a subset of HTML?

Comments

  • Posts: 819
    In your conf/config.php file you can add that line to set elements that are not allowed.
    To strip the <b></b> and <strong></strong> the config will look like this. It should be clear how to ban more elements.
    // Htmlpurifier
    $Configuration['HtmlPurifier']['HTML']['ForbiddenElements'] = array("b", "strong");
    I'm thinking my next plugin will be a configuration page in admin to set the forbidden elements.
  • lucluc
    Posts: 1,015
    @garymardell: it might be better to have your configuration page directly in the HtmlPurifier plugin
  • Posts: 819
    @luc your probably right, but once i write it its just a case of where it goes, if it gets to a standard of being included with the html purifier then we shall see. Im still waiting for a hook to be put in before i can release my next plugin Signatures.
  • @garymardell Thanks much, that's exactly what I needed.
  • I had html prufier problem.
Sign In or Register to comment.