<?php
-// $Id: checker.php,v 1.2 2007/07/03 14:51:07 henoheno Exp $
+// $Id: checker.php,v 1.8 2011/01/24 14:46:45 henoheno Exp $
// Concept-work of spam-uri metrics
// Copyright (C) 2006-2007 PukiWiki Developers Team
// License: GPL v2 or (at your option) any later version
error_reporting(E_ALL); // Debug purpose
require('spam.php');
-require('spam_pickup.php');
// Recursive array_map()
-// e.g. Sanitilze ALL values (Debug purpose): var_dump(recursive_map('htmlspecialchars', $array));
+// e.g. Sanitilze ALL values (Debug purpose): var_dump(recursive_map('htmlsc', $array));
function recursive_map($func, $array)
{
if (is_array($array)) {
function show_form($string, $asap = FALSE, $progress = TRUE, $pickup = TRUE)
{
- $string = htmlspecialchars($string);
+ $string = htmlsc($string);
$asap = $asap ? ' checked' : '';
$progress = $progress ? ' checked' : '';
$pickup = $pickup ? ' checked' : '';
$prog = isset($_POST['progress']) ? TRUE : FALSE;
$pickup = isset($_POST['pickup']) ? TRUE : FALSE;
-echo show_form($msg, $asap, $prog, $pickup);
+echo show_form(stripslashes($msg), $asap, $prog, $pickup);
echo '<br/>';
// Any rules will lock contents that have NG things already.
$spam['method']['edit'] = array(
// Supposed_by_you(n) * Edit_form_spec(2) * Margin(1.5)
- '_comment' => 'edit',
- //'quantity' => 60 * 3,
- //'non_uniquri' => 5 * 3,
- //'non_uniqhost' => 50 * 3,
- //'area_anchor' => 30 * 3,
- //'area_bbcode' => 15 * 3,
- 'uniqhost' => TRUE,
- 'badhost' => TRUE,
+ '_comment' => 'edit',
+ 'quantity' => 150 * 1.5,
+ 'non_uniq' => 5 * 1.5,
+ //'non_uniquri' => 5 * 1.5,
+ //'non_uniqhost' => 50 * 1.5,
+ 'area_anchor' => 3 * 1.5,
+ 'area_bbcode' => 1 * 1.5,
+ 'uniqhost' => TRUE,
+ 'badhost' => TRUE,
//'asap' => TRUE,
);
$tmp = summarize_detail_badhost($progress);
if ($tmp != '') {
echo 'DETAIL_BADHOST: ' .
- str_replace(' ', ' ', nl2br(htmlspecialchars($tmp). "\n"));
+ str_replace(' ', ' ', nl2br(htmlsc($tmp). "\n"));
}
}
$tmp = summarize_detail_newtral($progress);
if (! $asap && $tmp != '') {
echo 'DETAIL_NEUTRAL_HOST: ' .
- str_replace(' ', ' ', nl2br(htmlspecialchars($tmp). "\n"));
+ str_replace(' ', ' ', nl2br(htmlsc($tmp). "\n"));
}
if ($prog) {
echo '<pre>';
echo '$progress:' . "\n";
- echo htmlspecialchars(var_export($progress, TRUE));
+ echo htmlsc(var_export($progress, TRUE));
echo '</pre>';
}
}
if ($pickup) {
echo '<pre>';
- $results = uri_pickup_normalize(spam_uri_pickup($msg));
+ $results = spam_uri_pickup($msg);
+ $results = uri_pickup_normalize($results);
+ $results = uri_pickup_normalize_pathfile($results);
echo '$results:' . "\n";
- echo htmlspecialchars(var_export($results, TRUE));
+ echo htmlsc(var_export($results, TRUE));
echo '</pre>';
}
?>