Question

I am running Django trunk and have template Autoescaping on (default). Do I need to pass template URLs to the URLENCODE filter, or does Autoescape take care of that automatically? The Django docs aren't clear.

Django docs say this about Autoescape:

When auto-escaping is in effect, all variable content has HTML escaping applied to it before placing the result into the output (but after any filters have been applied). This is equivalent to manually applying the escape filter to each variable.

Was it helpful?

Solution

Yes, autoescaping is related only to HTML content. URL encoding is another story.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top