Not a bug XenForo_ControllerHelper_Xml fails at  


Well-known member
When importing style or any other XML document, controller uses this code
        $document = $this->getHelper('Xml')->getXmlFromFile($upload);
That code works fine for everything, but fails when content has   entity

This is sample valid XML document that function fails on
<?xml version="1.0" encoding="utf-8"?>
<email title="Test" customizer-version="2">
    <replacement var="footerBlock">test &nbsp; test</replacement>


Well-known member
&nbsp isn't a valid XML named entity. Or at least is wasn't in the past.

XML does not have (or didn't have) any named entities besides &lt;, &gt;, &quot;, &apos; and &amp;.


Well-known member
Sorry, this is invalid bug.

Well... bug is technically present because exporting and importing same content that has &nbsp; still causes error, but XenForo code has workaround for it creating child cdata nodes instead of setting value. So XenForo style import/export is not affected. I need to add same workaround to my add-on.