ニコニコ動画 アニメ ..
734:たまご ◆EGGMAN.HlI
09/02/26 21:02:17 /TbohrHr0
function aas_decodeHTMLEntity($e)
{
global $_conf;
$specialchars = array(
'amp' => '&',
'gt' => '>',
'lt' => '<',
'quot' => '"',
'nbsp' => ' '
);
$entity = $e[0];
$code = $e[1];
if (isset($specialchars[$code])) {
return $specialchars[$code];
}
if (substr($code, 0, 1) == '#') {
if (substr($code, 1, 1) == 'x') {
$code = hexdec(substr($code, 2));
} else {
$code = (int) substr($code, 1);
}
if ($code == 160) {
return ' ';
}
if ($code > 31 && $code != 127 && $code < 65536) {
$entity = sprintf('?%d;', $code);
$cnvmap = array(32, 65535, 0, 65535); // (0x20, 0xFFFF, 0, 0xFFFF)
return mb_decode_numericentity($entity, $cnvmap, AAS_INTERNAL_CHARSET);
}
}
return $_conf['expack.aas.unknown_char'];
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5384日前に更新/224 KB
担当:undef