Some comments have CDATA in them. The one I saw seemed to be pasted from microsoft word. This results in an XML file that will not be imported but have an error. A simple solution is remove the closing CDATA tag in the filter function like so:

function disqus_migrate_filter($text) {
  $text = str_replace("\r", '', $text);
  return str_replace("]]>", '', filter_dom_serialize(filter_dom_load($text)));
}

There may be a better solution.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

juampynr’s picture

Category: Feature request » Bug report
Priority: Normal » Critical
Status: Active » Needs review
FileSize
522 bytes

The suggested fix works. I adjusted it slightly. Here is a patch.

juampynr’s picture

Status: Needs review » Fixed

Committed. Thanks!

  • juampynr committed 2cef7fb on 7.x-1.x
    Issue #2275143 by juampynr: Add support for comments with CDATA
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.