querystring: escape buffer objects

and a little improvement in unescapeBuffer