function htmlpurifier_nodeapi in HTML Purifier 6.2
Same name and namespace in other branches
- 7.2 htmlpurifier.module \htmlpurifier_nodeapi()
- 7 htmlpurifier.module \htmlpurifier_nodeapi()
Implementation of hook_nodeapi().
File
- ./htmlpurifier.module, line 115 
- Implements HTML Purifier as a Drupal filter.
Code
function htmlpurifier_nodeapi(&$node, $op, $a3, $a4) {
  if ($op == 'view') {
    // Should we load CSS cache data from teaser or body?
    if ($a3 == TRUE) {
      _htmlpurifier_add_css($node->content['teaser']['#value'], $node->nid);
    }
    else {
      _htmlpurifier_add_css($node->content['body']['#value'], $node->nid);
    }
  }
  // @todo: Deal with CCK fields - probably needs to go in op alter?
}