Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
a815223c
Commit
a815223c
authored
May 10, 2019
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: return as it if no image source
parent
3a20a32d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_validateImage.py
...al_skins/erp5_corporate_identity/WebPage_validateImage.py
+4
-1
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_validateImage.py
View file @
a815223c
...
@@ -17,7 +17,10 @@ from zExceptions import NotFound
...
@@ -17,7 +17,10 @@ from zExceptions import NotFound
if
img_string
is
None
or
img_string
==
""
:
if
img_string
is
None
or
img_string
==
""
:
return
img_string
return
img_string
img_src
=
re
.
findall
(
"src=['
\
"
](.*?)['
\
"
]"
,
img_string
)[
0
]
img_src
=
re
.
findall
(
"src=['
\
"
](.*?)['
\
"
]"
,
img_string
)
if
not
len
(
img_src
):
return
img_string
# There is no image source, return as is
img_src
=
img_src
[
0
]
if
img_src
.
startswith
(
'data:image/'
):
if
img_src
.
startswith
(
'data:image/'
):
return
img_string
return
img_string
...
...
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