Hi, On 2/3/06, gstaniak <[EMAIL PROTECTED]> wrote: > What I get is the <span> element replaced by the html-escaped version > of > the 'greeting' parameter: > > <BODY> > <H1>Hello, world!</H1> > <p><b>Greetings from the controller</b></p> > > <P ALIGN="center"><IMG > SRC="/tg_static/images/tg_under_the_hood.png"></P> > </BODY> > > which is OK I guess, I just haven't learnt how to generate un-ecsaped > content yest.
py:replace="XML(greeting)" I like that Kid escapes by default. You just need to wrap the value in an XML() call to get the unescaped version. > However, there a strange thing happening when I try to do > the > same with the h1 element above: > > <body> > <h1 py:replace="greeting">Hello, world!</h1> > <span>controller greetings go here</span> > </body> > > gives: > > <BODY> > <SPAN>controller greetings go here</SPAN> > <P ALIGN="center"> <IMG > SRC="/tg_static/images/tg_under_the_hood.png"> </P> > </BODY> > > Does anybody know what's happening there? I checked out TG r630 today, > and I'm using Kid 0.8 and TurboKid 0.9.0 AFAIR. I'm not 100% sure why the tag is disappearing entirely in this case, but I do know that what you want is py:content not py:replace. py:replace completely removes the tag and replaces it with whatever expression you give it... which, in this case, would yield an invalid HTML file. py:content just replaces the contents of the tag but leaves the tag there. Kevin

