Commit 46f416d0 authored by Jérome Perrin's avatar Jérome Perrin Committed by Kazuhiko Shiozaki

BusinessTemplate: don't export publication_url if it's a file:// URL

parent cdde2d54
...@@ -88,7 +88,7 @@ from warnings import warn ...@@ -88,7 +88,7 @@ from warnings import warn
from lxml.etree import parse from lxml.etree import parse
from xml.sax.saxutils import escape from xml.sax.saxutils import escape
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
from six.moves.urllib.parse import quote, unquote from six.moves.urllib.parse import quote, unquote, urlparse
from difflib import unified_diff from difflib import unified_diff
import posixpath import posixpath
import transaction import transaction
...@@ -5743,6 +5743,9 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -5743,6 +5743,9 @@ Business Template is a set of definitions, such as skins, portal types and categ
value = self.getProperty(id) value = self.getProperty(id)
if not value: if not value:
continue continue
if id == 'publication_url':
if urlparse(value).scheme in ('file', ''):
continue
if prop_type in ('text', 'string', 'int', 'boolean'): if prop_type in ('text', 'string', 'int', 'boolean'):
bta.addObject(str(value), name=id, path='bt', ext='') bta.addObject(str(value), name=id, path='bt', ext='')
elif prop_type in ('lines', 'tokens'): elif prop_type in ('lines', 'tokens'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment