Hi All,

I'm trying to make a plugin that changes some specific terms on the 
various web pages (just experimenting with the interface right now, 
though) and have some strange behaviour with Genshi transforms and the 
ITemplateStreamFilter interface.  Here's my basic plugin:

from genshi.filters import Transformer

class UIPlugin(Component):
      """Substitute various terms on various templates.

      This plugin uses the ITemplateStreamFilter to filter various
      terms on specific pages, replacing ticket with task, milestone
      with job, etc..
      """

      implements(ITemplateStreamFilter)

      # ITemplateStreamFilter methods

      def filter_stream(self, req, method, filename, stream, data):
          filter = 
Transformer('//[EMAIL PROTECTED]"/chrome/common/trac_logo_mini.png"]')
          return stream | filter.substitute('common', 'site')

I'm getting a page (wiki front), but the contents are being interpreted 
as plain text instead of html.  I am basing the above plugin on the 
ticket_clone example, but I'm clearly missing something.  Any 
suggestions on what I'm doing wrong?

-Scott

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to