diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 7181a2b62..238adcd47 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -733,6 +733,8 @@ $xml_doc = $oXmlParser->parse($buff); if($xml_doc->div) $xml_doc = $xml_doc->div; + $xml_doc->body = $matches[3]; + // plugin attribute가 없으면 return $editor_component = $xml_doc->attrs->editor_component; if(!$editor_component) return $matches[0]; diff --git a/config/config.inc.php b/config/config.inc.php index d8b39b636..c1fe9b868 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -18,7 +18,7 @@ /** * @brief debug mode = true 일때 files/_debug_message.php 에 디버그 내용이 쌓임 **/ - define('__DEBUG__', true); + define('__DEBUG__', false); if(__DEBUG__) { // php5이상이면 error handling을 handleError() 로 set diff --git a/modules/editor/components/image_gallery/image_gallery.class.php b/modules/editor/components/image_gallery/image_gallery.class.php index c5d20c91c..fa6f479e0 100644 --- a/modules/editor/components/image_gallery/image_gallery.class.php +++ b/modules/editor/components/image_gallery/image_gallery.class.php @@ -48,8 +48,12 @@ $gallery_info->border_color = $xml_obj->attrs->border_color; $gallery_info->bg_color = $xml_obj->attrs->bg_color; - $body = preg_replace("/\.(gif|jpg|jpeg|png)/",'.$1'."\n", trim($xml_obj->body)); - $gallery_info->image_list = explode("\n",$body); + preg_match_all("/([^\"]){0,1}http([a-zA-Z0-9\_\-\:\/\.]*)(gif|jpg|jpeg|png)/i",trim($xml_obj->body),$matches); + $image_list = $matches[0]; + $image_count = count($image_list); + for($i=0;$i<$image_count;$i++) $image_list[$i] = preg_replace('/^(\>|\s)/','', $image_list[$i]); + $gallery_info->image_list = $image_list; + debugPrint($image_list); Context::set('gallery_info', $gallery_info);