in reply to Re: Formatting a text file for browser
in thread Formatting a text file for browser

Actually no. You will need to escape all the HTML special characters for them to display. Here is an example. The text is "Wrap your ascii file in <pre> tags, and you'll be set... almost too easy :)"

"Wrap your ascii file in 
 tags, and you'll be set... almost too easy :)"

Hmmm, not actually the text I wanted. I'll close that unmatched pre now

CGI.pm has an escapeHTML method to do this $html = $q->escapeHTML($text) As a browser will only render 1 space even if you have 10 in a row or tabs you need to escape these to. I have posted a solution in this thread - see below.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

  • Comment on Re: Re: Formatting a text file for browser