Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: how to force HTML to display as text

by JayBonci (Curate)
on Jan 24, 2002 at 15:45 UTC ( [id://141191]=note: print w/replies, xml ) Need Help??


in reply to how to force HTML to display as text

Alternatively, if you want the entire webpage to not escape out your html, you can begin your CGI or mod_perl web page script with:
print "Content-type: text/plain\n\n";
This will fool your browser into thinking it opened a text file instead of an HTML file on your sever. I'm not sure if you wanted it elsewhere in another HTML page, but going through the trouble of unescaping it would be silly if you could merely do a little MIME magic, and have it all work out... this of course depends on your intended use of aforementioned file. Good luck!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://141191]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found