Specifically, when you do a ?where={...} query with page=n and accept:text/xml request header, when n is greater than the results, you get a link to the previous page including the "?where" query, unquoted. In that case, you get an XML parsing exception due to the link href including literal {.
Specifically, when you do a
?where={...}
query with page=n andaccept:text/xml
request header, when n is greater than the results, you get a link to the previous page including the "?where" query, unquoted. In that case, you get an XML parsing exception due to the link href including literal{
.Instead of
xml.sax.saxutils.escape
, you probably wanturllib.quote
to quote the hrefs.