We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    I have created this configurable plugin to integrate HTML purifier into modx. (my first plugin)

    I have only been able to test this out on a Linux box with Apache2/PHP5/MySql5 with Modx 0.6.3

    As of right now, this only purifies the content field (it does not support TVs at this time.)

    If anyone has any suggestions or would like to see additional configuration variables, please let me know.

    Looking forward to everyone’s feedback
      • 8489
      • 90 Posts
      Great Script!

      But I don’t understand how you set for example the allowed html
      where must I put for example the rel attribute:

      if(!isset($htmlallowed)) { $htmlallowed = null; }
      $config->set(’HTML’, ’Allowed’, $htmlallowed); // Html allowed elements

      Thanks,
      Edski
        • 3232
        • 380 Posts
        you will want to add that tag to the allowed html field on the configuration tab.
          • 8489
          • 90 Posts
          I tried but that didn’t work

          I got it to work under "Variables and Configuration Start" with
          $config->set(’Attr’, ’AllowedRel’, ’external,nofollow,print’);