On Nov 22, 8:46 pm, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > SmileyChris wrote: > > The problem is, that it still gets double-escaped. Django's > > FilterExpression checks to see if the incoming object is SafeData, but > > at this stage it is a Model object - it hasn't be translated to its > > __unicode__ value yet. > > As far as I understand the thing *now*, it shouldn't make any difference > because neither your model object nor its __unicode__ is SafeData and > thus it needs escaping anyway.
I should have clarified that for this model, I have it's __unicode__ method return a safe string: return mark_safe('%s <small>(%s contacts)</small>' % (escape(self.name), self.contacts_total) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---