25 lines
548 B
PHP
25 lines
548 B
PHP
<?php
|
|
// File name: htmlchar.inc.php
|
|
// Description: PHP subroutines about HTML character entities
|
|
// Date: 2002-08-13
|
|
// Author: imacat <imacat@pristine.com.tw>
|
|
// Copyright: Copyright (C) 2002-2007 Pristine Communications
|
|
|
|
// h: Shortcut to htmlspecialchars()
|
|
function h($a)
|
|
{
|
|
return htmlspecialchars($a);
|
|
}
|
|
|
|
// dh: Reverse htmlspecialchars()
|
|
function dh($a)
|
|
{
|
|
$a = str_replace("<", "<", $a);
|
|
$a = str_replace(">", ">", $a);
|
|
$a = str_replace(""", "\"", $a);
|
|
$a = str_replace("&", "&", $a);
|
|
return $a;
|
|
}
|
|
|
|
?>
|