Copied from svn.plone.org branch toutpt