Displaying file in html loses format

I have a bash script to output the contents of a text file to html. Everything outputs ok, except this:

######################################################################
 # #
 # PRIVATE/PROPRIETARY #
 # #
 # ANY UNAUTHORIZED ACCESS TO, OR MISUSE OF ABC COMPANY #
 # SYSTEMS OR DATA MAY RESULT IN CIVIL AND/OR CRIMINAL #
 # PROSECUTION, EMPLOYEE DISCIPLINE UP TO AND INCLUDING #
 # DISCHARGE, OR THE TERMINATION OF VENDOR/SERVICE CONTRACTS. #
 # #
 # ABC COMPANY MAY PERIODICALLY MONITOR AND/OR AUDIT SYSTEM #
 # ACCESS/USAGE. #
 # #
 # #
 ######################################################################

Should look like this:

######################################################################
#                                                                    #
#                    ***PRIVATE/PROPRIETARY***                       #
#                                                                    #
#       ANY UNAUTHORIZED ACCESS TO, OR MISUSE OF ABC COMPANY         #
#       SYSTEMS OR DATA MAY RESULT IN CIVIL AND/OR CRIMINAL          #
#       PROSECUTION, EMPLOYEE DISCIPLINE UP TO AND INCLUDING         #
#       DISCHARGE, OR THE TERMINATION OF VENDOR/SERVICE CONTRACTS.   #
#                                                                    #
#       ABC COMPANY MAY PERIODICALLY MONITOR AND/OR AUDIT SYSTEM     #
#       ACCESS/USAGE.                                                #
#                                                                    #
#                                                                    #
######################################################################

The part of my script that uses this:

#!/bin/bash
echo "Content-type: text/html"
echo ""
TEXT=`echo "$QUERY_STRING" | sed -n 's/^.*var=\([^&]*\).*$/\1/p'`
FILE=$(cat /usr/local/apache/$TEXT | nawk 'sub("$","<br>")' |\
 sed -e "s/\*\*\*/ /g" -e "s/\*\*/ /g")
echo $FILE 

I had to remove the combinations of ** and *** because for some reason where ever they were in the file, the output would display all of the directory files. If I took the *'s out, it would not do this.

Hi, numele:

Multiple instances of whitespace in html are rendered as one space. If you need to preserve formating, look into using the <pre> element or perhaps substituting � (non-breaking space html entity) for each space in the text.

The expansion of * into the list of files in the current working directory (pathname expansion aka globbing) is ocurring because you have not double-quoted "$FILE" in the final statement. This happens because pathname expansion occurs after parameter expansion (the substitution of $FILE with the text it stores). Double quoting prevent the pathname expansion from happening.

Regards,
Alister

Thank you Alister, after I quoted my echo "$FILE" and used <pre> everything displays correctly.