X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/bfc72d6ee287ae6afaed266f48f6522b861c0a68..f53850f9b9d8071258091d66b4c781f2f4399d72:/AttachmentTool.py?ds=sidebyside
diff --git a/AttachmentTool.py b/AttachmentTool.py
index 979148d..87535c7 100644
--- a/AttachmentTool.py
+++ b/AttachmentTool.py
@@ -28,7 +28,8 @@ from Acquisition import aq_base
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
from OFS.Folder import Folder
-from OFS.Image import File, cookId
+from OFS.Image import cookId
+from Products.Photo.blobbases import File
from zExceptions import Unauthorized
from zExceptions import BadRequest
from Products.Photo import Photo
@@ -45,7 +46,9 @@ from webdav.common import Locked
from webdav.common import PreconditionFailed
from zope.contenttype import guess_content_type
-
+from libxml2 import HTML_PARSE_RECOVER, HTML_PARSE_NOERROR, HTML_PARSE_NOWARNING
+from libxml2 import htmlReadDoc
+PARSE_OPTIONS = HTML_PARSE_RECOVER + HTML_PARSE_NOERROR + HTML_PARSE_NOWARNING
class AttachmentTool( UniqueObject, SimpleItem):
""" Links attachment objects to contents.
@@ -185,7 +188,7 @@ class AttachmentContainer (Folder):
ob.PUT(REQUEST, RESPONSE)
RESPONSE.setStatus(httpRespCode)
RESPONSE.setHeader('Content-Type', 'text/xml;;charset=utf-8')
- if ob.meta_type == 'File' :
+ if ob.meta_type == 'Blob File' :
return '