Not a bug XenForo_ControllerHelper_Xml fails at  

Arty

Well-known member
When importing style or any other XML document, controller uses this code
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
Code:
<?xml version="1.0" encoding="utf-8"?>
<email title="Test" customizer-version="2">
  <replacements>
    <replacement var="footerBlock">test &nbsp; test</replacement>
  </replacements>
</email>
 
&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;.
 
Its exported using code that is pretty much identical to XenForo style export, so then its export bug.
 
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.
 
Top Bottom