Re: Developer help appreciated: unicode() not returning SafeString correctly - possibly a bug?

2009-10-15 Thread Margie Roginski
Ah - ok, I see! My knowledge of the unicode area is lacking, so I hadn't actually realized we were overriding a built-in by defining __unicode__. Completely obvious now that you point it out of course. I don't need to be returning a string instead of unicode. I just inadvertantly ended up doin

Re: Developer help appreciated: unicode() not returning SafeString correctly - possibly a bug?

2009-10-14 Thread Karen Tracey
On Wed, Oct 14, 2009 at 6:25 PM, Margie Roginski wrote: > > Eventually I end up in the force_unicode() function at code that looks > like this: > > if hasattr(s, '__unicode__'): >s = unicode(s) > > The call to unicode(s) has resulted in my render function getting > called, and as far as I can

Developer help appreciated: unicode() not returning SafeString correctly - possibly a bug?

2009-10-14 Thread Margie Roginski
I am seeing some odd behavior related to the django.utils.safestring.SafeString class. What I see is that if my render function returns a SafeString, the "safeness" of it is lost and its tags end up getting escaped. I've looked at this in detail in pdb and I think the issue is in force_unicode()