diff --git a/classes/widget/WidgetHandler.class.php b/classes/widget/WidgetHandler.class.php index 1fe6a6f2d..ccbc26345 100644 --- a/classes/widget/WidgetHandler.class.php +++ b/classes/widget/WidgetHandler.class.php @@ -83,7 +83,7 @@ if(count($object_vars)) { foreach($object_vars as $key => $val) { if(in_array($key, array('body','class','style','widget_sequence','widget','widget_padding_left','widget_padding_top','widget_padding_bottom','widget_padding_right'))) continue; - $args->{$key} = utf8RawUrlDecode(utf8RawUrlDecode($val)); + $args->{$key} = utf8RawUrlDecode($val); } } diff --git a/config/func.inc.php b/config/func.inc.php index 5ac341df6..6cdb5ed08 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -471,6 +471,11 @@ return preg_replace('/index.php/i','',$_SERVER['SCRIPT_NAME']); } + /** + * javascript의 escape의 php unescape 함수 + * Function converts an Javascript escaped string back into a string with specified charset (default is UTF-8). + * Modified function from http://pure-essence.net/stuff/code/utf8RawUrlDecode.phps + **/ function utf8RawUrlDecode ($source) { $decodedStr = ""; $pos = 0; @@ -485,8 +490,7 @@ $pos++; $unicodeHexVal = substr ($source, $pos, 4); $unicode = hexdec ($unicodeHexVal); - $entity = "&#". $unicode . ';'; - $decodedStr .= utf8_encode ($entity); + $decodedStr .= _code2utf($unicode); $pos += 4; } else { @@ -502,4 +506,12 @@ } return $decodedStr; } + + function _code2utf($num){ + if($num<128)return chr($num); + if($num<2048)return chr(($num>>6)+192).chr(($num&63)+128); + if($num<65536)return chr(($num>>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128); + if($num<2097152)return chr(($num>>18)+240).chr((($num>>12)&63)+128).chr((($num>>6)&63)+128) .chr(($num&63)+128); + return ''; + } ?> diff --git a/widgets/rank_point/rank_point.class.php b/widgets/rank_point/rank_point.class.php index de79b7ded..4b609926e 100644 --- a/widgets/rank_point/rank_point.class.php +++ b/widgets/rank_point/rank_point.class.php @@ -45,6 +45,8 @@ $obj->list_count = $list_count; $obj->is_admin = $args->without_admin == "true" ? "N" : ""; + $output = new Object(); + if(count($target_group) || count($target_group_without)) { // 그룹 목록을 구해옴 $group_list = $oMemberModel->getGroups();