Closed (fixed)
Project:
HTML Purifier
Version:
6.x-1.0
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2009 at 16:12 UTC
Updated:
19 Jun 2009 at 04:40 UTC
this is probably well outside of this module's purpose, but any tips would be a huge help for my current situation.
i have a template that loads a node using the drupal function node_load(), which apparently doesn't always give you the 'safe' version of text content fields, only the unfiltered 'value' version. is there a way to apply html purifier to any string as a workaround for this limitation of node_load()?
Comments
Comment #1
ezyang commentedDo you want to use one of the configured filter formats, or do you need a custom set of configuration for the template?
Comment #2
mattgilbert commentedI want to use one of the configured filters. No need for a custom configuration, although if it's easier I would be fine with mimicking the configured filter in some other form.
Comment #3
mattgilbert commentedI've worked around this by hard-coding some preg_replace()s in the template. Still would be nice to have the actual (much better coded) filtering system available.
Comment #4
ezyang commented_htmlpurifier_process($html, $format_id) is the "private" function that does the filtering. I'm kind of hesitant recommending you use this; the alternative is to directly invoke htmlpurifier_filter() (which has the normal well defined *_filter() interface and is guaranteed to stay the same). Either should work.