described earlier (unless the parts in question also end in semicolon)that might help for replies fetched manually with urllib requestbut not when rendered in browsersfrom html parser import htmlparser html open('test-escapes html'read(htmlparser(unescape(html'\nhello\navoiding conflicts what to do thento make this work as expected in all casesthe separators should generally be escaped if your parameter names may clash with an html escape codehello browsers render this fully escaped link as expected (open test-escapes html to test)and python' html parser does the right thing as wellfile py?name= &job= &amp= &sect= &lt= result in both ie and chrome 'hellohtmlparser(unescape( 'hellobecause of this conflict between html and url syntaxmost server tools (including python' urlib parse query-parameter parsing tools employed by python' cgi modulealso allow semicolon to be used as separator instead of the following linkfor exampleworks the same as the fully escaped urlbut does not require an extra html escaping step (at least not for the ;)file py?name= ;job= ;amp= ;sect= ;lt= python' html parser unescape tool allows the semicolons to pass unchangedtoosimply because they are not significant in html code to fully test all three of these link forms for yourself at onceplace them in an html fileopen the file in your browser using its html file in example - will suffice example - pp \internet\web\badlink html < href"cgi-bin/badlink py?name= &job= &amp= &sect= &lt= ">unescaped < href"cgi-bin/badlink py?name= &amp;job= &amp;amp= &amp;sect= &amp;lt= ">escaped < href"cgi-bin/badlink py?name= ;job= ;amp= ;sect= ;lt= ">alternative more on html and url escapes