Hi,

[[< needs to be escaped to [[&gt; in serialization.py. The attached
patch fixes this and works for people using python-kid on Fedora.

A Fedora bug report with more details is available here:
https://bugzilla.redhat.com/show_bug.cgi?id=528729

Regards
Till
diff -up kid-0.9.6/kid/serialization.py.escape-gt kid-0.9.6/kid/serialization.py
--- kid-0.9.6/kid/serialization.py.escape-gt    2007-07-16 13:02:53.000000000 
+0200
+++ kid-0.9.6/kid/serialization.py      2010-01-10 14:42:09.000000000 +0100
@@ -408,6 +408,7 @@ class XMLSerializer(Serializer):
                     return encode_entity(text, entities=entity_map)
             text = text.replace("&", "&amp;")
             text = text.replace("<", "&lt;")
+            text = text.replace("]]>", "]]&gt;")
         except (TypeError, AttributeError):
             raise_serialization_error(text)
         return text
@@ -423,6 +424,7 @@ class XMLSerializer(Serializer):
                     return encode_entity(text, entities=entity_map)
             text = text.replace("&", "&amp;")
             text = text.replace("<", "&lt;")
+            text = text.replace("]]>", "]]&gt;")
             text = text.replace("\"", "&quot;")
         except (TypeError, AttributeError):
             raise_serialization_error(text)
@@ -684,6 +686,7 @@ class HTMLSerializer(HTMLBased, Serializ
             if escape:
                 text = text.replace("&", "&amp;")
                 text = text.replace("<", "&lt;")
+                text = text.replace("]]>", "]]&gt;")
         except (TypeError, AttributeError):
             raise_serialization_error(text)
         return text

Attachment: pgptEpO5Xywec.pgp
Description: PGP signature

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
kid-template-discuss mailing list
kid-template-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss

Reply via email to