fixed SCRIPT(ASSIGNJS(foo=bar)), thanks Paolo Pastori

This commit is contained in:
mdipierro
2020-06-13 23:06:38 -07:00
parent 7427258b90
commit ba30988580
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1450,8 +1450,10 @@ class SCRIPT(DIV):
(fa, co) = self._xml()
fa = to_bytes(fa)
# no escaping of subcomponents
co = b'\n'.join([to_bytes(component) for component in
self.components])
co = b'\n'.join(map(to_bytes,
# allow xml components (i.e. ASSIGNJS)
map(lambda c: c.xml() if hasattr(c, 'xml') and callable(c.xml) else c,
self.components)))
if co:
# <script [attributes]><!--//--><![CDATA[//><!--
# script body