[Zope] html space( ) in string

Jos van der Vleuten Jos.van.der.Vleuten@transiciel.nl
Tue, 25 Mar 2003 17:20:22 +0100

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

Content-Type: text/plain;

chr(38) is also rendered as &

Jos van der Vleuten

-----Original Message-----
From: Passin, Tom
To: Jos van der Vleuten; zope@zope.org
Sent: 25-3-2003 16:28
Subject: RE: [Zope] html space( ) in string

[Jos van der Vleuten]

> The following code-snippet: 
>        global space python:[' ;']; 
>        global str_html_space python:space[0]*new_len_title; 
> would be rendered in html as: ........... ........ 
> How can i solve this so that it will render a correct html space
( )? 

use chr(38) for the ampersand -

chr(38) + 'nbsp;']


Tom P

Content-Type: text/html;

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Zope] html space(&amp;nbsp;) in string</TITLE>

<P><FONT SIZE=2>chr(38) is also rendered as &amp;amp;</FONT>

<P><FONT SIZE=2>regards,</FONT>
<BR><FONT SIZE=2>Jos van der Vleuten</FONT>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Passin, Tom</FONT>
<BR><FONT SIZE=2>To: Jos van der Vleuten; zope@zope.org</FONT>
<BR><FONT SIZE=2>Sent: 25-3-2003 16:28</FONT>
<BR><FONT SIZE=2>Subject: RE: [Zope] html space(&amp;nbsp;) in string</FONT>

<P><FONT SIZE=2>[Jos van der Vleuten]</FONT>

<P><FONT SIZE=2>&gt; The following code-snippet: </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global space python:['&amp;nbsp;;']; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global str_html_space python:space[0]*new_len_title; </FONT>
<BR><FONT SIZE=2>&gt; would be rendered in html as: ...........&amp;amp;nbsp;........ </FONT>
<BR><FONT SIZE=2>&gt; How can i solve this so that it will render a correct html space</FONT>
<BR><FONT SIZE=2>(&amp;nbsp;)? </FONT>

<P><FONT SIZE=2>use chr(38) for the ampersand -</FONT>

<P><FONT SIZE=2>chr(38) + 'nbsp;']</FONT>

<P><FONT SIZE=2>Cheers,</FONT>