Escape problem
Thomas Guettler
guettli at thomas-guettler.de
Tue Mar 2 10:52:56 EST 2004
Am Tue, 02 Mar 2004 06:57:19 -0800 schrieb ketulp_barod:
> Hi
> I am developing a web application.
> I have a string 'foo"bar"' say in variable s.
> When I print s on the python shell it prints correctly 'foo"bar"'
> whereas when I try to display s on the form it just prints 'foo'. What
> should I do to print complete string 'foo"bar"' on the form
Hi,
have a look at the HTML source-code. Does it look right?
If you want to use the value in an attribute,
you need to quote it:
cgi.escape(s, 1)
thomas
More information about the Python-list
mailing list