[Zope] Quoting Text to valid HTML
Roger Oberholtzer
roger.oberholtzer at surbrunn.net
Tue Mar 9 01:44:18 EST 2004
If I have a site in, say, Turkish, and have set it up to be utf-8, but
the site also contains iso8859-1 characters. The later do not show up if
they are not quoted. In fact, any word containing such a iso8859-1
character is gone from the generated html source. In this case it is a
Plone site. My users enter text in either the ZMI (less often) or via
Plone's built-in editor. Being non-computer savy, the people entering
the text just want to use the characters on their keyboard. It is not
going to happen that they learn how to quote when they add articles.
So, how, specifically, would I use these tools to quote the text
site-wide?
It seems that the current state of Zope/CMF/Plone allows many languages,
including utf-8 - as long as there is one at a time. If the text is not
utf-8 (or whatever the site is set to be), it must be simple ASCII.
Content within a site, in some user-added text, cannot be something
else. Right? Or did I miss something obvious here.
BTW, I would really like to be able to add 'localecontent' instead of
simple 'documents', but that code has never worked for me. Should it be
working with the current Zope(2.6.2)/CMF(1.4)/Plone(2) products? Would
that sort out this problem? Anyone got that to work?
On Tue, 2004-03-09 at 01:13, Peter Bengtsson wrote:
> PieterB wrote:
>
> > On Mon, Mar 08, 2004 at 01:33:05PM +0400, Samir Mishra wrote:
> >
> >>What I need is -
> >>some_html_fn("this & that") -> "this & that"
> >>etc. but with more than just the "&" replacement.
> >
>
> What's wrong with the html_quote function?
> <dtml-var "'this & that'" html_quote>
>
> or
> from Products.PythonScripts.standard import html_quote
>
> print html_quote("this & that")
> But it doesn't replace åäöé etc.
>
> >
> > Try http://utidylib.sourceforge.net
> > (a Python wrapper for tidy).
> >
> > Pieter
> >
More information about the Zope
mailing list