summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Gedminas <marius@gedmin.as>2013-02-07 23:18:38 +0000
committerMarius Gedminas <marius@gedmin.as>2013-02-07 23:18:38 +0000
commitc278af8b431e558883f3aa17fc3fcbe42697b826 (patch)
tree43ec00717e915b0ecf496031cd888d40eb99b935
parentbb7febeede25b601ebbb5a7a038ae9c9232e56db (diff)
downloadzope-tal-c278af8b431e558883f3aa17fc3fcbe42697b826.tar.gz
Explain the &#45 parsing difference (it's the stdlib)
-rw-r--r--src/zope/tal/tests/test_talinterpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zope/tal/tests/test_talinterpreter.py b/src/zope/tal/tests/test_talinterpreter.py
index 24c1b3c..3717851 100644
--- a/src/zope/tal/tests/test_talinterpreter.py
+++ b/src/zope/tal/tests/test_talinterpreter.py
@@ -709,13 +709,13 @@ class OutputPresentationTestCase(TestCaseBase):
def test_entities(self):
if sys.version_info < (3, 0):
+ # HTMLParser.HTMLParser in Python 2.x parses "&#45" as "&#45"
INPUT = ('<img tal:define="foo nothing" '
'alt="&a; &#1; &#x0a; &a &#45 &; <>" />')
EXPECTED = ('<img alt="&a; \x01 \n '
'&amp;a &amp;#45 &amp;; &lt;&gt;" />')
else:
- # XXX: why does &#45 with no terminating ; become a - on
- # Python 3.3 and is that acceptable or a regression?
+ # html.parser.HTMLParser in Python 3.3 parses "&#45" as "-"
INPUT = ('<img tal:define="foo nothing" '
'alt="&a; &#1; &#x0a; &a &#45 &; <>" />')
EXPECTED = ('<img alt="&a; \x01 \n '