[Zope] Re: Using Restructured text with & and other characters

Alec Munro alec.munro at eoascientific.com
Wed Dec 3 15:44:34 EST 2003


Well, I figured it out.

When I retrieve "rest_doc" it replaces characters with HTML entities.
When I retrieve "rest_doc.source" it does not.
So I use rest_doc.source,  and so far so good.

Alec

Alec Munro wrote:

> Hi list,
>
> I'm pretty much pulling my hair out at this point.
> For some reason I am unable to get an "&" displayed on my web page, 
> not matter what I do.
> The offending character resides in a RestructuredText document.
> I've tried escaping it:  \&    \\&   \\\\&
> I've tried: &   \x38   \u0026
>
> I've changed the encodings on the Doc to iso-8859-1 from iso-8859-15 
> and UTF-8.
> The encoding on the web site is iso-8859-1 .
>
> Right now, the ReST doc itself displays properly in the "view" tab, 
> but on the site, we get & displayed. So somewhere along there, it 
> not only converts & to & it also converts it again to &
>
> Here's how I call the ReST doc:
>
> <span tal:content="structure python: 
> modules['Products.PythonScripts.standard'].restructured_text(rest_doc)">
>
> Any ideas?
>
> Thanks.
>
> Alec Munro
>
>
>





More information about the Zope mailing list