Fix #936 w/o side effects: don't escape QUERY_STRING (not necessary for our purpose)
merge [3767/branches/0.11], refs #936