[Zope-dev] problems with accented characters - need advice
Casey Duncan
casey@zope.com
18 Jun 2002 14:11:21 -0400
There is a function defined in ObjectManager.py called checkValidId. You
could override this to enforce certain rules either in a subclass of OM
(overridding _setObject) or by a direct monkey patch of
ObjectManager.py.
Then it would not be possible to supply invalid names from anywhere
(ZMI, DAV, FTP or programmatically).
hth,
-Casey
On Tue, 2002-06-18 at 13:08, Eric Brun wrote:
>
> hello,
>
> we are looking for a simple solution to ensure that objects added to the zope database have valid names... including those which start out containing accented characters ( we are in europe ).
>
> we are considering making the change in our PUT, located in NullResource.py in the webdav area. we are wondering if anyone has any comments about this solution... is it a good idea. anyone have any other ideas?
>
>
> we have a process method for correcting accented characters and is located in the constructor of the
> object class : it works like
> ob.id = processID(name)
>
> here is the change...we have added 'ob.id or name' to setObject method request.
>
>
> <code starts here>
> # Delegate actual PUT handling to the new object.
> ob.PUT(REQUEST, RESPONSE)
> self.__parent__._setObject(ob.id or name, ob)
>
>
> Eric Brun
> Savoie Technologie
> Savoie Technolac
>
>
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )