Python: parse_qsl and semi colon (;)

let say you have a query string ?var1=test;abc&var2=ok

when you use function parse_qsl to parse query to get the variable , you will see you have a several variables:

var1 = test
abc=””
var2=ok

This is because parse_qsl use “&” and “;” as a separate , to overcome this we need to replace “;” with %3B , then we’ll replace it back in our variable values


Leave a Reply

Your email address will not be published. Required fields are marked *