update CGI script for formatting html chunk