Commit 35accf50 authored by Andreas Jung's avatar Andreas Jung

Collector #587: fixed wrong migration to string methods

parent 06b8b283
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
"""DTML Method objects.""" """DTML Method objects."""
__version__='$Revision: 1.79 $'[11:-2] __version__='$Revision: 1.80 $'[11:-2]
import History import History
from Globals import HTML, DTMLFile, MessageDialog from Globals import HTML, DTMLFile, MessageDialog
...@@ -368,14 +368,14 @@ def decapitate(html, RESPONSE=None): ...@@ -368,14 +368,14 @@ def decapitate(html, RESPONSE=None):
headers.append(header) headers.append(header)
spos = m.end() + 1 spos = m.end() + 1
while spos < len(html) and html[spos] in ' \t': while spos < len(html) and html[spos] in ' \t':
eol = find(html, '\r\n', spos) eol = html.find('\r\n', spos)
if eol <> -1: if eol <> -1:
eolen = 2 eolen = 2
else: else:
eol = find(html, '\n', spos) eol = html.find( '\n', spos)
if eol < 0: return html if eol < 0: return html
eolen = 1 eolen = 1
header.append(strip(html[spos:eol])) header.append(html[spos:eol].strip())
spos = eol + eolen spos = eol + eolen
if RESPONSE is not None: if RESPONSE is not None:
for header in headers: for header in headers:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment