[Zope3-checkins] SVN: Zope3/trunk/ Fixed encoding of newlines,
carriage returns, and tabs when
Fred L. Drake, Jr.
fdrake at gmail.com
Fri Oct 20 00:50:11 EDT 2006
Log message for revision 70828:
Fixed encoding of newlines, carriage returns, and tabs when
encoding attributes for widgets so we're consistent under all
Python 2.4.x versions (including 2.4.4, which failed tests before).
Changed:
U Zope3/trunk/Makefile
U Zope3/trunk/doc/CHANGES.txt
U Zope3/trunk/src/zope/app/form/browser/textwidgets.py
U Zope3/trunk/src/zope/app/form/browser/widget.py
U Zope3/trunk/src/zope/app/rotterdam/editingwidgets.py
-=-
Modified: Zope3/trunk/Makefile
===================================================================
--- Zope3/trunk/Makefile 2006-10-20 04:25:41 UTC (rev 70827)
+++ Zope3/trunk/Makefile 2006-10-20 04:50:10 UTC (rev 70828)
@@ -1,4 +1,4 @@
-PYTHON=python2.4
+PYTHON=python2.4.3
TESTFLAGS=-v
TESTOPTS=
SETUPFLAGS=
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt 2006-10-20 04:25:41 UTC (rev 70827)
+++ Zope3/trunk/doc/CHANGES.txt 2006-10-20 04:50:10 UTC (rev 70828)
@@ -133,6 +133,10 @@
Bug fixes
+ - Fixed encoding of newlines, carriage returns, and tabs when
+ encoding attributes for widgets so we're consistent under all
+ Python 2.4.x versions (including 2.4.4, which failed tests before).
+
- Fixed issue 535: make HTTPInputStream work with Python 2.4.4.
- As part of zope.decorator refactoring, its dependancy were not removed
Modified: Zope3/trunk/src/zope/app/form/browser/textwidgets.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/textwidgets.py 2006-10-20 04:25:41 UTC (rev 70827)
+++ Zope3/trunk/src/zope/app/form/browser/textwidgets.py 2006-10-20 04:50:10 UTC (rev 70828)
@@ -257,8 +257,7 @@
id="field.foo"
name="field.foo"
type="hidden"
- value="Hello\r
- world!"
+ value="Hello world!"
/>
Calling `setRenderedValue` will change what gets output:
Modified: Zope3/trunk/src/zope/app/form/browser/widget.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/widget.py 2006-10-20 04:25:41 UTC (rev 70827)
+++ Zope3/trunk/src/zope/app/form/browser/widget.py 2006-10-20 04:50:10 UTC (rev 70828)
@@ -34,6 +34,15 @@
import warnings
+
+if quoteattr("\r") != '"&13;"':
+ _quoteattr = quoteattr
+
+ def quoteattr(data):
+ return _quoteattr(
+ data, {'\n': ' ', '\r': ' ', '\t':'	'})
+
+
class BrowserWidget(Widget, BrowserView):
"""Base class for browser widgets.
Modified: Zope3/trunk/src/zope/app/rotterdam/editingwidgets.py
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/editingwidgets.py 2006-10-20 04:25:41 UTC (rev 70827)
+++ Zope3/trunk/src/zope/app/rotterdam/editingwidgets.py 2006-10-20 04:50:10 UTC (rev 70828)
@@ -57,8 +57,7 @@
id="field.foo"
name="field.foo"
type="hidden"
- value="Hello\r
- world!"
+ value="Hello world!"
/>
Calling `setRenderedValue` will change what gets output:
More information about the Zope3-Checkins
mailing list