Module

Archived
Forum
(read-only)

Charlie Hawker does not actively monitor this forum
(but you can still get help from other EE users).

Weblog Entries Exporter

ExpressionEngine 1.x

Back to this add-on's main page
View Other Add-ons From Charlie Hawker

     

You must be logged in to post.

unterminated entity reference

Support Request

rmedek
rmedek

When I try to export certain weblogs, I get an “unterminated entity reference error.”  My guess is that certain characters in the weblog field aren’t getting escaped correctly.

Some examples from the XML output:

<b>Warning</b>:  SimpleXMLElement::addChild() [<a href='simplexmlelement.addchild'>simplexmlelement.addchild</a>]unterminated entity reference id=291696186&amp;s=143441 in <b>/system/modules/weblog_entries_exporter/mcp.weblog_entries_exporter.php</bon line <b>334</b><br />

<
b>Warning</b>:  SimpleXMLElement::addChild() [<a href='simplexmlelement.addchild'>simplexmlelement.addchild</a>]unterminated entity reference     Jane Doe in <b>/system/modules/weblog_entries_exporter/mcp.weblog_entries_exporter.php</bon line <b>223</b><br /> 

I ended up blanketing “htmlspecialchars()” everywhere as a patch to get some assets delivered, but of course now everything’s escaped, even the things I don’t want escaped.

Charlie Hawker
# 1
Developer
Charlie Hawker

Just to let you know, I’ve looked into this, and it seems to be the way I am constructing the XML, for example:

$my_xml_object->addChild('test''This & That'); 

Will result in:

'This & That' 

being the value for the test child, whereas:

$my_xml_object->test 'This & That'

Will result in:

'This &amp; That' 

being the value. I’ll work on a fix for you and test it. Release coming soon.

Thanks for letting me know :)

Charlie Hawker
# 2
Developer
Charlie Hawker

Hi - I am assuming that you’re using version 1.2 of the addon, and that the errors you describe are appearing somewhere in your XML files that are generated by the addon. Could you attach one of these XML files for me? I’ve tested as far as I can on a number of websites with varied content in weblogs, and so far been unable to replicate the issue you’re having.

rmedek
# 3
rmedek

Hi Charlie,

Can I email or PM you with the files? I’d prefer not to post them online as I’d like to leave the paths, content, etc. intact for you.

Just to be clear, too, I’ve already got the site exported, so I’m not in a rush to fix anything, just giving you a heads up on a possible issue for others. :)

Charlie Hawker
# 4
Developer
Charlie Hawker

No worries, I’m grateful you raised the issue! I don’t think it’s possible to send private messages on Devot:ee forums, do you have an account on the expressionengine forums (expressionengine.com/forums) - mine on there is dooper3 - and you can PM me there. If the file’s bigger than 250kb, I can give you my email address in a PM on that site.

Charlie

Charlie Hawker
# 5
Developer
Charlie Hawker

This issue has been resolved as part of version 1.2.1 of the module. Thanks Richard for being the guinea pig for the new version! Also new in version 1.2.1 is jQuery for the control panel support, and if you’re using jQuery for the control panel, you’ll find that choosing XML-only options (export comments) will set CSV as unavailable, and hide the CSV options, plus choosing XML as the output format will also hide CSV options. Enjoy!