Thanks Kevin, this worked like a champ once I upgraded to TurboGears
0.8.7 (it didn't seem to work before).
Thanks for letting me know about this, I seemed to miss the change
during my holiday vacation!
-- Jonathan
On Jan 5, 2006, at 1:39 PM, Kevin Dangoor wrote:
Hi Jonathan,
You might want to try cgi.escape. There was a change made to Kid that
gives it (some|all) of the common HTML entities.
Kevin
On 1/5/06, Jonathan LaCour <[EMAIL PROTECTED]> wrote:
I am seeing a bug in a TurboGears application that I have in
production where people are entering text in textile format. I am
saving this text in the database, and on the way out textile encoding
it, and passing it into a kid template, which then includes the
string in the template using the XML() function.
The bug I am seeing is when people use certain characters in their
text (such as < and >, for example) that cause invalid XML.
Typically, I would just run my string through cgi.escape() before I
pass it into textile, but this will use named entity definitions,
which I don't believe XML supports.
Is there an equivalent to cgi.escape out there that will generate
XML-
friendly entity definitions, or a better solution to my problem? I
am considering just doing a string replacement on the two offending
characters for now, but this seems a bit of a hack, and doesn't
handle other characters that could potentially cause problems...
Thanks.
--
Jonathan LaCour
http://cleverdevil.org
--
Kevin Dangoor
Author of the Zesty News RSS newsreader
email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com
--
Jonathan LaCour
http://cleverdevil.org