summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Vasiliev <dima@hlabs.spb.ru>2007-06-21 10:11:17 +0000
committerDmitry Vasiliev <dima@hlabs.spb.ru>2007-06-21 10:11:17 +0000
commit476cd5e089febac0d0b42d7cc67536474b057168 (patch)
treee0d9fed6bd6040db014ce5a9fe6e5236e56bd39f
parentb65d2a8d3ba13d0060ad3797c0c7e5e04513b3fd (diff)
downloadzope-tal-476cd5e089febac0d0b42d7cc67536474b057168.tar.gz
Fixed handling of <i18n:...> elements for HTML
-rw-r--r--src/zope/tal/htmltalparser.py2
-rw-r--r--src/zope/tal/tests/input/test37.html3
-rw-r--r--src/zope/tal/tests/output/test37.html3
3 files changed, 7 insertions, 1 deletions
diff --git a/src/zope/tal/htmltalparser.py b/src/zope/tal/htmltalparser.py
index 10400b2..93538e8 100644
--- a/src/zope/tal/htmltalparser.py
+++ b/src/zope/tal/htmltalparser.py
@@ -313,6 +313,6 @@ class HTMLTALParser(HTMLParser):
repr(keybase), self.getpos())
i18ndict[keybase] = value
attrlist.append(item)
- if namens in ('metal', 'tal'):
+ if namens in ('metal', 'tal', 'i18n'):
taldict['tal tag'] = namens
return name, attrlist, taldict, metaldict, i18ndict
diff --git a/src/zope/tal/tests/input/test37.html b/src/zope/tal/tests/input/test37.html
new file mode 100644
index 0000000..601f7af
--- /dev/null
+++ b/src/zope/tal/tests/input/test37.html
@@ -0,0 +1,3 @@
+<span xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <i18n:block translate="">Test</i18n:block>
+</span>
diff --git a/src/zope/tal/tests/output/test37.html b/src/zope/tal/tests/output/test37.html
new file mode 100644
index 0000000..5c68ed0
--- /dev/null
+++ b/src/zope/tal/tests/output/test37.html
@@ -0,0 +1,3 @@
+<span>
+ TEST
+</span>