Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
3ca7bc49
Commit
3ca7bc49
authored
Dec 20, 2017
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web: raise non-base64 convert instead of letting cloudoo guess
parent
9dea97d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_convertHtmlToSingleFile.py
...tem/portal_skins/erp5_web/Base_convertHtmlToSingleFile.py
+9
-6
No files found.
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_convertHtmlToSingleFile.py
View file @
3ca7bc49
...
...
@@ -132,10 +132,15 @@ def handleHref(href):
return
href
try
:
obj
=
traverseHref
(
href
)
except
(
KeyError
,
Unauthorized
):
# KeyError can be side_object_dict[domain] KeyError
# or restrictedTraverse(path) KeyError
return
makeHrefAbsolute
(
href
)
except
KeyError
:
raise
Exception
(
"KeyError: %s"
%
(
href
))
except
Unauthorized
:
raise
Exception
(
"Unauthorized: %s"
%
(
href
))
#except (KeyError, Unauthorized):
## KeyError can be side_object_dict[domain] KeyError
## or restrictedTraverse(path) KeyError
# impossible to debug if we let cloudooo decide what to do
#return makeHrefAbsolute(href)
return
handleHrefObject
(
obj
,
href
)
def
handleImageSource
(
src
):
...
...
@@ -202,7 +207,6 @@ def handleHrefObject(obj, src, default_mimetype="text/html", default_data="<p>Li
if
isinstance
(
data
,
unicode
):
data
=
data
.
encode
(
"utf-8"
)
return
handleLinkedData
(
mime
,
data
,
src
)
return
handleLinkedData
(
default_mimetype
,
default_data
,
src
)
bad_image_data_url
=
(
...
...
@@ -352,5 +356,4 @@ def anny(iterable, key=None):
if
i
:
return
True
return
False
return
main
(
data
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment