Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
a558fa87
Commit
a558fa87
authored
Jan 06, 2007
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added
parent
61832080
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
1 deletion
+49
-1
lib/python/Products/PageTemplates/configure.zcml
lib/python/Products/PageTemplates/configure.zcml
+11
-0
lib/python/Products/PageTemplates/interfaces.py
lib/python/Products/PageTemplates/interfaces.py
+1
-1
lib/python/Products/PageTemplates/unicodeconflictresolver.py
lib/python/Products/PageTemplates/unicodeconflictresolver.py
+37
-0
No files found.
lib/python/Products/PageTemplates/configure.zcml
0 → 100644
View file @
a558fa87
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:five="http://namespaces.zope.org/five">
<utility
provides="zope.component.interfaces.IFactory"
component="Products.PageTemplates.unicodeconflictresolver.UnicodeEncodingResolverFactory"
/>
</configure>
lib/python/Products/PageTemplates/interfaces.py
View file @
a558fa87
...
@@ -4,7 +4,7 @@ from zope.interface import Interface
...
@@ -4,7 +4,7 @@ from zope.interface import Interface
class
IUnicodeEncodingConflictResolver
(
Interface
):
class
IUnicodeEncodingConflictResolver
(
Interface
):
class
resolve
(
context
,
text
):
def
resolve
(
context
,
text
):
""" Returns 'text' as unicode string.
""" Returns 'text' as unicode string.
'context' is the current context object
'context' is the current context object
"""
"""
...
...
lib/python/Products/PageTemplates/unicodeconflictresolver.py
0 → 100644
View file @
a558fa87
###########################################################################
# TextIndexNG V 3
# The next generation TextIndex for Zope
#
# This software is governed by a license. See
# LICENSE.txt for the terms of this license.
###########################################################################
from
zope.component.interfaces
import
IFactory
from
zope.interface
import
implements
,
implementedBy
from
Products.PageTemplates.interfaces
import
IUnicodeEncodingConflictResolver
class
UnicodeEncodingResolver
:
implements
(
IUnicodeEncodingConflictResolver
)
def
__init__
(
self
,
context
,
text
):
self
.
context
=
context
self
.
text
=
text
def
resolve
(
self
,
context
,
text
):
return
unicode
(
self
.
text
,
errors
=
'replace'
)
class
UnicodeEncodingResolverFactory
:
implements
(
IFactory
)
def
__call__
(
self
,
context
,
text
):
return
UnicodeEncodingResolver
(
context
,
text
)
def
getInterfaces
(
self
):
return
implementedBy
(
UnicodeEncodingResolverFactory
)
UnicodeEncodingResolverFactory
=
UnicodeEncodingResolverFactory
()
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