diff --git a/browser/common.py b/browser/common.py index 1e400cb..e96c7ac 100644 --- a/browser/common.py +++ b/browser/common.py @@ -671,6 +671,8 @@ class BaseView(GenericView, I18NView): @Lazy def xeditable(self): + if self.typeOptions('no_external_edit'): + return False ct = getattr(self.context, 'contentType', '') if not ct or ct in ('application/pdf', 'application/x-pdf'): return False diff --git a/browser/resource.py b/browser/resource.py index 7d41259..e2a9816 100644 --- a/browser/resource.py +++ b/browser/resource.py @@ -207,7 +207,8 @@ class ResourceView(BaseView): data = context.data if useAttachment: filename = adapted(self.context).localFilename or getName(self.context) - filename = NameChooser(getParent(self.context)).normalizeName(filename) + if not self.typeOptions('no_normalize_download_filename'): + filename = NameChooser(getParent(self.context)).normalizeName(filename) response.setHeader('Content-Disposition', 'attachment; filename=%s' % filename) response.setHeader('Content-Length', len(data))