Until a proper way to do it hits svn you can disable output encoding in kid for some html tags.
from kid import serialization
serialization.HTMLSerializer.noescape_elements.add('div')
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 :
<div><![CDATA[ ]]></div>