Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27239
| Date | 2012-08-17 06:41 -0700 |
|---|---|
| From | Dan Sommers <dan@tombstonezero.net> |
| Subject | Re: [CGI] Why is HTML not rendered? |
| References | <hihs289062ottjtqpgpkbl3pb6b1irj9kq@4ax.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3414.1345210924.4697.python-list@python.org> (permalink) |
On 2012-08-17 at 15:27:59 +0200,
Regarding "[CGI] Why is HTML not rendered?,"
Gilles <nospam@nospam.com> wrote:
> For some reason, this CGI script that I found on Google displays the
> contents of the variable but the HTML surrounding it is displayed
> as-is by the browser instead of being rendered:
... [with all due respect and apologies to another thread on this list!]
> print "Content-Type: text/plain;charset=utf-8"
That line tells the browser that the response is plain text.
Do this instead to have the browser render the HTML:
print "Content-Type: text/html;charset=utf-8"
HTH,
Dan
--
Μὴ μοῦ τοὺς κύκλους τάραττε -- Αρχιμηδησ
Do not disturb my circles. -- Archimedes
Dan Sommers, http://www.tombstonezero.net/dan
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[CGI] Why is HTML not rendered? Gilles <nospam@nospam.com> - 2012-08-17 15:27 +0200
Re: [CGI] Why is HTML not rendered? Dan Sommers <dan@tombstonezero.net> - 2012-08-17 06:41 -0700
Re: [CGI] Why is HTML not rendered? Robert Kern <robert.kern@gmail.com> - 2012-08-17 14:44 +0100
Re: [CGI] Why is HTML not rendered? Gilles <nospam@nospam.com> - 2012-08-17 18:19 +0200
Re: [CGI] Why is HTML not rendered? Alexander Blinne <news@blinne.net> - 2012-08-17 15:40 +0200
csiph-web