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

ezyang’s picture

Nodes 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?

Slim Pickens’s picture

Thanks 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!

ezyang’s picture

Ok, 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.

I presume the filtered output makes use of Drupal's caching?

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.

Slim Pickens’s picture

Good news! A feed item with a YouTube enclosure just came through (finally) and the YouTube resizing hack has worked perfectly.

Cheers

ezyang’s picture

Status: Active » Closed (fixed)