Re: template: writing "\u20ac 20.000" fails

2009-01-29 Thread SanPy
Well, I thought it didn't escape the input string. I was wrong. I tried `escape_js` again and now it works just fine. It probably did before, but I don't remember why I thought it didn't. Regards, Sander On 28 jan, 04:28, Malcolm Tredinnick wrote: > On Tue, 2009-01-27

Re: template: writing "\u20ac 20.000" fails

2009-01-27 Thread Malcolm Tredinnick
On Tue, 2009-01-27 at 00:37 -0800, SanPy wrote: > Thanks a lot, Malcolm, > > You got me on the right track, I just needed to escape the string, > like this: > > var prices=[{% for price in prices %}[{{ price.0 }}, '{{ price.1| > escape }}']{% if not forloop.last %},{% endif %}{% endfor %}]; >

Re: template: writing "\u20ac 20.000" fails

2009-01-27 Thread SanPy
Thanks a lot, Malcolm, You got me on the right track, I just needed to escape the string, like this: var prices=[{% for price in prices %}[{{ price.0 }}, '{{ price.1| escape }}']{% if not forloop.last %},{% endif %}{% endfor %}]; I tried the `escapejs` filter. That didn't work. Then I tried

Re: template: writing "\u20ac 20.000" fails

2009-01-26 Thread Malcolm Tredinnick
On Mon, 2009-01-26 at 14:40 -0800, SanPy wrote: > For my website, I need to write this in one of my generated html's > (dynamically, of course): > > > var prices=[[0, '\u20ac 0'],[100, '\u20ac 100'],[150, '\u20ac 150'], > [200, '\u20ac 200'],[250, '\u20ac 250'],[300, '\u20ac 300']]; > > >

template: writing "\u20ac 20.000" fails

2009-01-26 Thread SanPy
For my website, I need to write this in one of my generated html's (dynamically, of course): var prices=[[0, '\u20ac 0'],[100, '\u20ac 100'],[150, '\u20ac 150'], [200, '\u20ac 200'],[250, '\u20ac 250'],[300, '\u20ac 300']]; BTW, \u20ac represents the € symbol. Whatever I try, I can't write