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
Labels
Merge Requests
140
Merge Requests
140
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
957d0b4d
Commit
957d0b4d
authored
Dec 23, 2022
by
Jérome Perrin
Committed by
Arnaud Fontaine
Mar 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patches: drop zope.contenttype patch
This patch seems not needed
parent
81184b5f
Pipeline
#27189
failed with stage
in 0 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
22 deletions
+0
-22
product/ERP5Type/ZopePatch.py
product/ERP5Type/ZopePatch.py
+0
-1
product/ERP5Type/patches/zopecontenttype.py
product/ERP5Type/patches/zopecontenttype.py
+0
-21
No files found.
product/ERP5Type/ZopePatch.py
View file @
957d0b4d
...
...
@@ -76,7 +76,6 @@ from Products.ERP5Type.patches import OFSHistory
from
Products.ERP5Type.patches
import
OFSItem
from
Products.ERP5Type.patches
import
ExternalMethod
from
Products.ERP5Type.patches
import
User
from
Products.ERP5Type.patches
import
zopecontenttype
from
Products.ERP5Type.patches
import
OFSImage
from
Products.ERP5Type.patches
import
_transaction
from
Products.ERP5Type.patches
import
default_zpublisher_encoding
...
...
product/ERP5Type/patches/zopecontenttype.py
deleted
100644 → 0
View file @
81184b5f
from
__future__
import
print_function
# Monkey Patch the zope.contenttype to be able to detect svg image format.
try
:
import
zope.contenttype
original_text_type
=
zope
.
contenttype
.
text_type
def
svg_fix_text_type
(
s
):
s
=
s
.
strip
()
if
'<html>'
not
in
s
and
"<svg"
in
s
:
return
'image/svg+xml'
# If it is not an svg, just try original behaviour.
# This preserve the further improvements on zope.contenttype
# and preserve the fix.
return
original_text_type
(
s
)
# Overwrite original method with the SVG detection fix.
zope
.
contenttype
.
text_type
=
svg_fix_text_type
except
ImportError
:
print
(
"Skip to patch zope.contenttype, because it is not present."
)
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