1

I think I understand the use of django's template tools: {% autoescape off %} and {{ somehting|safe }}, but I'm not sure they apply to what I need. And if they do, they aren't working...

So, I have a multiple forms with get and post methods on the same page. Both methods (for searching and posting) retain the & symbol in the url. But when I use the get method(search) then use the post method after, I get &amp ; instead of &.

navigate to page:
.../something/
get method after returns:
.../something/?search=somethingelse&search_location=anotherthing

pagination works well still (so its not hrefs)
post method after all this returns:
.../something/?search=somethingelse& amp;search_location=anotherthing& amp;page=5

and if I keep posting I get a sequence of amp;:

.../something/?search=somethingelse&search_location=anotherthing&page=5  

I think it might be the {{crsf_token}} require for post forms that encodes it.
I also tried mark_safe() in the views.py
I've been looking for some time now. Any help would be appreciated

pnuts
  • 58,317
  • 11
  • 87
  • 139
caelator
  • 31
  • 2
  • 1
    I am not sure you question is well formed, since the actual code is missing. Have a look at [this SO QA](http://stackoverflow.com/questions/4591525/is-it-possible-to-pass-query-parameters-via-djangos-url-template-tag) – Pynchia Sep 26 '15 at 22:53
  • Thanks for the reply. The link you have points to a href problem. It's a form with post method problem tho. I was really just looking to see if there were any ampersand decoding possibilities for csrf_token. – caelator Sep 27 '15 at 16:15

0 Answers0