[Zope-dev] Re: [Zope] special characters
John Eikenberry
jae@kavi.com
Thu, 4 Mar 1999 15:48:12 -0800 (PST)
On Thu, 4 Mar 1999, John Eikenberry wrote:
> This leads to a followup question/request for the group.
>
> 'manage_addProperty' calls various converters from ZPublisher.Converters
> to format the properties values. Shouldn't html_quote be used when
> formatting strings and text? This would be trivial to change. Would this
> cause some problem I don't realize? If not, I'd like to add this to the
> Collector for the next version.
(Switched over to zope-dev to reply to myself.)
After a bit more digging, I found some weirdness in
Zope/lib/python/OFS/properties.dtml
<!--#if "type in ('string', 'int', 'long', 'float', 'date')"-->
<input type="text" name="<!--#var id-->:<!--#var type-->" size="35"
value="<!--#var "_[id]"-->">
<!--#elif "type=='string'"-->
<input type="text" name="<!--#var id-->:string" size="35"
value="<!--#var "_[id]" html_quote-->">
'string' is in the first list, this is probably a bug considering it has
its own #elif and this case does the correct formatting. The 'text' type
don't have the html_quote format thought, and they probably should to.
So, is it's probably better to format this stuff here (on the way to the
display) rather than on the way to storage.
I'll probably enter this one in the Collector. I'll test it a bit first.
---
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