[Zope] special characters

John Eikenberry John Eikenberry <jae@kavi.com>
Thu, 4 Mar 1999 14:26:18 -0800 (PST)


Ok, what's the trick to getting special characters to be converted to
their escape codes (eg. " to &quot;). This is particularly important for
forms in which the user may enter these types of character. 

For instance, if I create a property on a folder that is a string, and if
the string I enter has quotes around it... it doesn't show in the
interface the next time I go to edit the properties. For example, in
MCExam, the 2nd sample question has this as an answer "bar, spam". If I go
to the folder's properties to change it, it doesn't show up. In the source
it looks like: 

<input type="text" name="ans3:string" size="35"
   value=""bar, spam"">

Obviously, if I then save changes, the value is gone altogether.

Is there a way of automatically converting quotes and other special
characters to their escape codes (like the sqlquote method)?

Thanks,

---

John Eikenberry
[jae@kavi.com - http://taos.kavi.com/~jae/] 
______________________________________________________________
"A society that will trade a little liberty for a little order
 will deserve neither and lose both."
                                         --B. Franklin