[EMAIL PROTECTED] wrote:
Suppose I access this function:

       def foo():
           return "<a href='http://mysite'>some text</a>"

In a template with this:

       ${foo()}

Kid will convert '<' to &lt; which makes HTML not interpret it as a normal hyperlink. (It seems Kid tries to be nice and 'fix' special
characters like < and & for you.)

*How turn off this conversion for '<' so that it appears like a normal
hyperlink?

If you define the function that way, you need to write ${XML(foo())} instead of ${foo()} or redefine your foo() function to apply the XML function at the end.

You don't need to to this if you define the function within Kid:

<a py:def="foo()" href='http://mysite'>some text</a>

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
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