Commit a6a05271 authored by Nigel McNie's avatar Nigel McNie
Browse files

When importing entries as blogpost entries, look at their content type and...

When importing entries as blogpost entries, look at their content type and convert it to HTML if necessary.
parent 778dbd79
......@@ -235,7 +235,12 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
$blogpost->set('description', $content);
}
else {
$blogpost->set('description', PluginImportLeap::get_entry_content($entry, $importer));
$description = PluginImportLeap::get_entry_content($entry, $importer);
$type = isset($entry->content['type']) ? (string)$entry->content['type'] : 'text';
if ($type == 'text') {
$description = format_whitespace($description);
}
$blogpost->set('description', $description);
}
if ($published = strtotime((string)$entry->published)) {
$blogpost->set('ctime', $published);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment