Re: html output via hdf
Brandon Long <[email protected]>
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Organization | Fiction L Networks |
| Message-ID | <20070823235335.GB6853@bl1> |
On 08/23/07 Nikolai Kondrashov uttered the following other thing:
> Jeremy Carey wrote:
> > I have a project website using Trac that I am working on, which uses
> > Python and Clearsilver. In my Python code I have a string that
> > contains the HTML output I want to use in the temple:
> >
> > req.hdf['somehtml'] = loadsofhtml
> >
> > but when I access the variable
> >
> > <?cs var:somehtml ?>
> >
> > it has had the HTML characters all escaped into entity codes. Is
> > there someway to stop this happening?
>
> You could do it like this:
> <?cs uvar:somehtml ?>
So, something is escaping the variable. It could be that you're set up
to use the default escaping mechanism in more recent clearsilver
releases, in which case the uvar: example that Nikolai gave will work.
Otherwise, there is something in the python wrapper that you are using
through Trac which is doing the escaping for you, and you'd have to find
out from the Trac help pages how to avoid that escaping. In particular,
the hdf wrapper that comes with clearsilver doesn't have a dictionary
like access, so req.hdf['somehtml'] has to be from Trac.
Brandon
--
"Never apply a Star Trek solution to a Babylon 5 problem"
(as seen on a bulletin board in Fermi lab)
http://www.fiction.net/blong/