Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27241

Re: [CGI] Why is HTML not rendered?

Date 2012-08-17 15:40 +0200
From Alexander Blinne <news@blinne.net>
Newsgroups comp.lang.python
Subject Re: [CGI] Why is HTML not rendered?
References <hihs289062ottjtqpgpkbl3pb6b1irj9kq@4ax.com>
Message-ID <502e49ca$0$6558$9b4e6d93@newsspool4.arcor-online.net> (permalink)
Organization Arcor

Show all headers | View raw


On 17.08.2012 15:27, Gilles 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:

> print "Content-Type: text/plain;charset=utf-8"

With this line you tell the browser to expect a simple plain text file
and no html. Change the line to

print "Content-Type: text/html;charset=utf-8"

and it should work.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


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