On Sun, 2008-07-20 at 22:03 -0700, Chris wrote:
> I'm running the current trunk, and I'm seeing a strange problem. I > noticed Django's templates were occasionally displaying variables as > empty strings, when there should have been something. Then I realized, > all the strings that weren't being shown had a \x... character in > them. Can you construct a small example to demonstrate what you mean here? It doesn't sound like a problem that we hear of all the time, so you'll need to supply some details. Print out what repr() of the data is before you pass it to the template and then show how you are trying to display it in the template. We don't need the full template, you could write a view that just sends out constant data (so the view is one line long) and a template that just displays that data, for example. Simplest example possible always wins. > I can understand why these characters aren't being shown, but > why is the entire string not being shown? Shouldn't the the default > setup automatically escape or strip out these characters? No. Whatever data you pass in a string (bytestring or unicode instance) to the template is included literally. Unless you go to special lengths, it will be interpreted as UTF-8 characters by the browser on the client side. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

