On Wed, 2007-06-06 at 00:04 -0700, iain duncan wrote:
> On Tue, 2007-05-06 at 18:26 -0700, iain duncan wrote:
> > I have users submitting content that includes html, and now I also have
> > beautiful soup in a validator cleaning it up nicely. In my main
> > controller, I have told kid not to escape this content by including the
> > following at the top of the controller:
> > 
> > outputformat = kid.HTMLSerializer(doctype='xhtml')
> > outputformat.noescape_elements.add('div')
> > tg.config.update({'kid.outputformat': outputformat})
> > 
> > This seems to work fine. But I can't figure out how to accomplish the
> > same thing for content that is handled by widgets. I have widgets in a
> > separate file and they are all custom widgets classes with templates in
> > there. I'm at a loss as to how to get the same results from these
> > widgets. Putting the above in the widget code didn't work. Any clues?
> 
> Nevermind, I discovered that is is working, just not with py:replace=
> 
> If I change py:replace= to py:content= then all is ok!

On further inspection, it turns out that if I do py:content plus
py:strip=True, the same thing happens.

Is there a reason using strip changes the output format or might this be
a bug?

Thanks
iain


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to