diff --git a/modules/importer/importer.admin.controller.php b/modules/importer/importer.admin.controller.php index f2267357f..3ef0061f9 100644 --- a/modules/importer/importer.admin.controller.php +++ b/modules/importer/importer.admin.controller.php @@ -968,7 +968,8 @@ $obj->module_srl = $module_srl; $obj->document_srl = getNextSequence(); $obj->title = $post->title->body; - $obj->content = str_replace('[##_ATTACH_PATH_##]/','',$post->content->body); + $obj->content = str_replace('[##_ATTACH_PATH_##]','',$post->content->body); + $obj->content = preg_replace_callback('!\[##_1C\|([^\|]*)\|([^\|]*)\|(.*?)_##\]!is', array($this, '_replaceTTImgTag'), $obj->content); $obj->password = md5($post->password->body); $obj->allow_comment = $post->acceptcomment->body==1?'Y':'N'; $obj->allow_trackback= $post->accepttrackback->body==1?'Y':'N'; @@ -1074,6 +1075,13 @@ $this->setMessage(sprintf(Context::getLang('msg_import_finished'), $success_count, $total_count)); } + /** + * @brief ttxml의 자체 img 태그를 치환 + **/ + function _replaceTTImgTag($matches) { + return sprintf("\"%s\"", $matches[1], str_replace("\"","\\\"",$matches[3])); + } + /** * @brief TTXML에 맞게 category정보 입력 **/