특정 애드온을 적용했는데 같이 글자가 아예 날라갑니다.
문제의 애드온입니다.
https://dumpcookie.tistory.com/entry/XE-%EA%B2%8C%EC%8B%9C%ED%8C%90%EC%9A%A9-%EC%9C%84%ED%82%A4-URL-%EB%A7%A4%ED%95%91-%EC%95%A0%EB%93%9C%EC%98%A8
<?php if (!defined('__XE__') && !defined('__ZBXE__')) exit(); /** * @author wkpark ([email protected]) * @file urlmapping.addon.php * @date 2012-05-09 * @version 0.1 * @brief UrlMapping add-on */ if ($called_position != 'before_display_content' || Context::getResponseMethod() !== 'HTML') return; if (isCrawler()) return; if (Context::get('act') == 'dispBoardWrite' || Context::get('act') == 'dispBoardModifyComment' || Context::get('act') == 'dispAddonAdminSetup') return; $wiki_main = $addon_info->wikiurl; if (empty($wiki_main) or !preg_match('@^https?://@', $wiki_main)) //$wiki_main = 'http://ko.wikipedia.org/wiki/'; $wiki_main = 'http://rigvedawiki.net/r1/wiki.php/'; $url_mappings = array(); $rules = array(); $url_mapping_rule = ''; if ($addon_info->use_urlmapping != 'N') {; $urlmap = trim($addon_info->urlmapping); $urlmaps = explode("\n", $urlmap); foreach ($urlmaps as $map) { if (preg_match('/^wiki|https?|ftp|mailto/', $map)) { $url = trim(strtok($map,' ')); $val = strtok(''); $url_mappings[$url] = trim($val); $rules[] = preg_quote($url, '/'); } } if (count($rules) > 0) $url_mapping_rule = implode('|', $rules); } // split into chunks $chunks = preg_split('/(<[^>]+>)/', $output, -1, PREG_SPLIT_DELIM_CAPTURE); for ($i = 0; $i < count($chunks); $i++) { if ($i % 2) { if (preg_match('/^<a\s/', $chunks[$i])) $is_link = true; else $is_link = false; } else { if (!$is_link) $chunks[$i] = preg_replace('/\[\[([^]]+)\]\]/e', '"[[".'. '"<a href=\''.$wiki_main.'".urlencode("$1").'. '"\'>$1</a>]]"', $chunks[$i]); } } $output = implode('', $chunks); // URL remapping if (!empty($url_mapping_rule)) $output = preg_replace('/('.$url_mapping_rule.')/ie',"\$url_mappings['\\1']", $output); /* End of file urlmapping.addon.php */ /* Location: ./addons/urlmapping/urlmapping.addon.php */
코드는 이렇고요.