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
cadf4598
Commit
cadf4598
authored
Jan 11, 2007
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #2263: 'field2ulines' did not convert empty string correctly.
o Forward-port from 2.8 branch.
parent
b6873816
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
lib/python/ZPublisher/Converters.py
lib/python/ZPublisher/Converters.py
+12
-3
No files found.
lib/python/ZPublisher/Converters.py
View file @
cadf4598
...
...
@@ -154,9 +154,18 @@ class field2utext(_unicode_converter):
return
unicode
(
field2text
(
v
.
encode
(
'utf8'
)),
'utf8'
)
field2utext
=
field2utext
()
class
field2ulines
(
_unicode_converter
):
def
convert_unicode
(
self
,
v
):
return
field2utext
.
convert_unicode
(
v
).
split
(
'
\
n
'
)
class
field2ulines
:
def
__call__
(
self
,
v
):
if
hasattr
(
v
,
'read'
):
v
=
v
.
read
()
if
isinstance
(
v
,
(
ListType
,
TupleType
)):
return
[
field2ustring
(
x
)
for
x
in
v
]
v
=
unicode
(
v
)
return
self
.
convert_unicode
(
v
)
def
convert_unicode
(
self
,
v
):
return
field2utext
.
convert_unicode
(
v
).
splitlines
()
field2ulines
=
field2ulines
()
type_converters
=
{
...
...
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