tags:

views:

73

answers:

2

simple%20minds is displayed when do this:

{{ rec.artist_name }}

How do I remove the %20...and make it spaces?

When I put | safe as a fitler, the error is:

Could not parse the remainder: ' | safe' from 'active.artist_name | safe'

Thanks.

+2  A: 

I think you're being hit by Django's relatively-new autoescaping. What happens if you do

{{ rec.artist_name | safe }}

to avid the value being autoescaped?

Alex Martelli
Hi Alexa, I've tried that, but it doesn't work for some reason.
TIMEX
Could not parse the remainder:
TIMEX
is the %20 also stored in db?
Juparave
Actually, this is applied to it before I shoot it to the template.urllib.quote(q.encode('utf-8'))
TIMEX
Then that is the expected output - urllib.quote will replace spaces with %20. Why are you doing that?
Daniel Roseman
+1  A: 

Try removing the space between the rec.artist_name and the |. So you should have this:

{{ rec.artist_name|safe }}

That'll fix the autoescaping, but I think the other commentors are correct in saying that you're storing the %20 into the db. So you'll probably have to fix it on that end of things.

Jeff