mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-12 00:54:48 +02:00
PSR-2 reformatting PHPDoc corrections
With minor corrections. Signed-off-by: Marcus Bointon <marcus@synchromedia.co.uk> Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
committed by
Edward Z. Yang
parent
19eee14899
commit
fac747bdbd
@@ -12,4 +12,3 @@ $serial = $config->serialize();
|
||||
$result = unserialize($serial);
|
||||
$purifier = new HTMLPurifier($result);
|
||||
echo htmlspecialchars($purifier->purify('<b>Bold</b><br><i><a href="http://google.com">no</a> formatting</i>'));
|
||||
|
||||
|
@@ -9,14 +9,16 @@ if (!isset($_GET['standalone'])) {
|
||||
}
|
||||
error_reporting(E_ALL);
|
||||
|
||||
function escapeHTML($string) {
|
||||
function escapeHTML($string)
|
||||
{
|
||||
$string = HTMLPurifier_Encoder::cleanUTF8($string);
|
||||
$string = htmlspecialchars($string, ENT_COMPAT, 'UTF-8');
|
||||
return $string;
|
||||
}
|
||||
|
||||
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
|
||||
function fix_magic_quotes(&$array) {
|
||||
function fix_magic_quotes(&$array)
|
||||
{
|
||||
foreach ($array as $k => $val) {
|
||||
if (!is_array($val)) {
|
||||
$array[$k] = stripslashes($val);
|
||||
|
@@ -2,7 +2,8 @@
|
||||
|
||||
require_once('common.php');
|
||||
|
||||
function formatCode($string) {
|
||||
function formatCode($string)
|
||||
{
|
||||
return
|
||||
str_replace(
|
||||
array("\t", '»', '\0(null)'),
|
||||
|
Reference in New Issue
Block a user