Commit 96a77e5b authored by Nicolas Delaby's avatar Nicolas Delaby

Insert head element as first child of html node


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45679 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b6b20a5
......@@ -37,7 +37,8 @@ def includeMetaContentType(html_node):
"""
head = html_node.find('head')
if head is None:
head = SubElement(html_node, 'head')
head = Element('head')
html_node.insert(0, head)
meta_content_type_node_list = head.xpath('meta[translate('\
'attribute::http-equiv, "CONTEYP", "conteyp") = "content-type"]')
for meta_content_type_node in meta_content_type_node_list:
......
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