You should CGI::escape the postcode as per the original line of code here.