Closed (fixed)
Project:
HTML Purifier
Version:
5.x-1.3
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 May 2008 at 21:35 UTC
Updated:
10 Jul 2009 at 00:09 UTC
Thanks for the bug fix for the configuration error.
Can you clarify how htmlpurifier is operating in Drupal. Are nodes being filtered on output and cached or are they being processed on input?
I'm particularly interested in the YouTube module as it would seem to offer the option of re-sizing all YouTube enclosures to fit my two-column layout - but it's not doing it to an earlier feed item node by editing it and applying the htmlpurifier filter. Perhaps it will when a new one comes in?
I'm also thinking the YouTube function could be adapted to resize images to fit the layout. I'd like to find a way to have this happen in teaser generation while leaving the original size for full page view!
Comments
Comment #1
ezyang commentedNodes are being filtered on output. It is possible that HTML Purifier may be filtering out the width and height from your node (I take it that the YouTube module is separate from HTML Purifier's YouTube filter). What order are your filters?
Comment #2
Slim Pickens commentedThanks for the clarification. I presume the filtered output makes use of Drupal's caching?
All I've done is checked the YouTube option in your module's Drupal configuration and edited the output sizes in the YouTube.php file in /library/filters. Should this work?
I have no other filters in the test setup - just htmlpurifier. It's performing really well so far, but there have only been about a dozen new feed items since I enabled my test filter using htmlpurifier as the default filter for feed items (using Simplefeed). The site has always been plagued with poorly formed html in the incoming feed items - especially unclosed tags breaking the layout. So far so good!
Comment #3
ezyang commentedOk, this is an upstream issue with the HTML Purifier library. I'll keep it active here and close it when it's fixed on HTML Purifier's side. Your fix should be ok, although it's somewhat inflexible.
Sort-of; we have a cache table identical to filter's except that the items are permanently cached. This prevents cache slams on high performance sites.
Comment #4
Slim Pickens commentedGood news! A feed item with a YouTube enclosure just came through (finally) and the YouTube resizing hack has worked perfectly.
Cheers
Comment #5
ezyang commented