Re: is_safe problem

2007-11-28 Thread SmileyChris
On Nov 29, 12:29 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Drop them in a ticket and I'll commit them. http://code.djangoproject.com/ticket/6049 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: is_safe problem

2007-11-28 Thread Malcolm Tredinnick
On Wed, 2007-11-28 at 15:06 -0800, SmileyChris wrote: > On Nov 29, 9:28 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > I've fixed it, after a fashion, in r6721. > > Why no tests? Drop them in a ticket and I'll commit them. Malcolm

Re: is_safe problem

2007-11-28 Thread SmileyChris
On Nov 29, 9:28 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I've fixed it, after a fashion, in r6721. Why no tests? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this

Re: is_safe problem

2007-11-28 Thread Malcolm Tredinnick
On Thu, 2007-11-22 at 14:26 -0800, SmileyChris wrote: > On Nov 22, 10:48 pm, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > P.S. However I think you try to shoot yourself in the foot by tying > > general unicode representation of an object to work only for HTML. I'd > > rather leave it to some

Re: is_safe problem

2007-11-22 Thread SmileyChris
On Nov 22, 10:48 pm, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > P.S. However I think you try to shoot yourself in the foot by tying > general unicode representation of an object to work only for HTML. I'd > rather leave it to some special filter. Probably. I'm definitely being lazy ;) But the

Re: is_safe problem

2007-11-22 Thread Ivan Sagalaev
SmileyChris wrote: > I should have clarified that for this model, I have it's __unicode__ > method return a safe string: > > return mark_safe('%s (%s contacts)' % > (escape(self.name), self.contacts_total) Hm... I give up then :-). From my looking around the code I think it should behave as

Re: is_safe problem

2007-11-22 Thread SmileyChris
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 > >

Re: is_safe problem

2007-11-21 Thread Ivan Sagalaev
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

Re: is_safe problem

2007-11-21 Thread Michael Radziej
Hi Chris, SmileyChris wrote: > So my template looks like: {{ group|caps }} (`group` is a Model object > and the `caps` filter just capitalizes the first letter) and I'm stuck > with double escaping. > > The problem is, that it still gets double-escaped. Django's > FilterExpression checks to see

Re: is_safe problem

2007-11-21 Thread SmileyChris
PS: I've never even noticed the built-in `capfirst` filter until just now, but mine was pretty much identical. The built-in one doesn't solve this problem either. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

is_safe problem

2007-11-21 Thread SmileyChris
So my template looks like: {{ group|caps }} (`group` is a Model object and the `caps` filter just capitalizes the first letter) and I'm stuck with double escaping. The problem is, that it still gets double-escaped. Django's FilterExpression checks to see if the incoming object is SafeData, but