[FIX] translate: doctype is removed from the backend web template
issue: The rendering is altered because the browser doesn't know how to parse the html and css content
This commit is contained in:
@@ -243,8 +243,11 @@ class XMLTranslator(object):
|
||||
|
||||
# process children nodes locally in child_trans
|
||||
child_trans = XMLTranslator(self.callback, self.method, parser=self.parser)
|
||||
if node.text and not avoid_pattern.match(node.text):
|
||||
child_trans.todo(escape(node.text))
|
||||
if node.text:
|
||||
if avoid_pattern.match(node.text):
|
||||
child_trans.done(escape(node.text)) # do not translate <!DOCTYPE...
|
||||
else:
|
||||
child_trans.todo(escape(node.text))
|
||||
for child in node:
|
||||
child_trans.process(child)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user