From 4e15b638f6c33ec4ef1815404854390e334135b1 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Wed, 23 Jun 2010 13:05:00 +0000
Subject: [PATCH] Backport
 http://dev.plone.org/archetypes/changeset/11766/Products.PortalTransforms/trunk/Products/PortalTransforms/transforms/safe_html.py
 - add support of HTML5

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36537 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../PortalTransforms/transforms/safe_html.py  | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/product/PortalTransforms/transforms/safe_html.py b/product/PortalTransforms/transforms/safe_html.py
index 67c67f16e7..d9b8845590 100644
--- a/product/PortalTransforms/transforms/safe_html.py
+++ b/product/PortalTransforms/transforms/safe_html.py
@@ -39,6 +39,34 @@ VALID_TAGS['tfoot'] = 1
 VALID_TAGS['col'] = 1
 VALID_TAGS['colgroup'] = 1
 
+# HTML5 tags that should be allowed:
+VALID_TAGS['article'] = 1
+VALID_TAGS['aside'] = 1
+VALID_TAGS['audio'] = 1
+VALID_TAGS['canvas'] = 1
+VALID_TAGS['command'] = 1
+VALID_TAGS['datalist'] = 1
+VALID_TAGS['details'] = 1
+VALID_TAGS['dialog'] = 1
+VALID_TAGS['figure'] = 1
+VALID_TAGS['footer'] = 1
+VALID_TAGS['header'] = 1
+VALID_TAGS['hgroup'] = 1
+VALID_TAGS['keygen'] = 1
+VALID_TAGS['mark'] = 1
+VALID_TAGS['meter'] = 1
+VALID_TAGS['nav'] = 1
+VALID_TAGS['output'] = 1
+VALID_TAGS['progress'] = 1
+VALID_TAGS['rp'] = 1
+VALID_TAGS['rt'] = 1
+VALID_TAGS['ruby'] = 1
+VALID_TAGS['section'] = 1
+VALID_TAGS['source'] = 1
+VALID_TAGS['time'] = 1
+VALID_TAGS['video'] = 1
+
+
 msg_pat = """
 <div class="system-message">
 <p class="system-message-title">System message: %s</p>
-- 
2.30.9