I am not sure how to remove spaces and & in the django template variable. Actually I rendered a url string as django variable when I load a page.
But it automatically contains & and spaces. After all, in html view, it is showed with &, % inside of the variable when I print it out in js console.
Of course, I can fix in js code by replacing them, but code will get messy so I want to another way with python or django code.
any ideas to remove them in server-side?
Result:
http://127.0.0.1:8000/users?key=fff&ids=(1%,3%,4%,12%)
what I expect:
http://127.0.0.1:8000/users?key=fff&ids=(1,3,4,12)