<dtml-var formelement html_quote> should do it.

or <dtml-let html_formelement="_.string.replace(formelement,'"','&quot;')">
<dtml-var html_formelement>
</dtml-let>
...if you want to replace a single chr.

BTW, what is the html entitiy for ' ?
----- Original Message ----- 
From: Tim Russell <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 11, 2000 9:43 PM
Subject: [Zope] String Substitution


> I'm trying to convert data entered in a form to a format that I can
> manipulate later, specifically, I need to convert " (double quotes) and
> possibly ' (single-quotes) to the appropriate HTML substitute, like &quot .
> What's the easiest way to do this? Is there built-in Zope functionality for
> this, or will it be necessary to use an external Python method? Thanks..
> 
> 
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to