pi_http: escape special characters