Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Until a proper way to do it hits svn you can disable output encoding in kid for some html tags.

from kid import serialization

Then in your template you dont need to use XML() anymore.

<div py:content="yourvariable"/>

If you want to insert your entity in a tag in the template source you must enclose it with cdata :