fixed query string to escape pipes