forked from GithubBackups/vichan
what the fuck were you even thinking
this is an insane default BUGFIX: all-Japanese, all-Arabic, etc posts no longer trip the filter if not robot_enable
This commit is contained in:
parent
968fab9420
commit
f8c1d7c80f
@ -1332,10 +1332,12 @@ function getPages($mod=false) {
|
|||||||
|
|
||||||
// Stolen with permission from PlainIB (by Frank Usrs)
|
// Stolen with permission from PlainIB (by Frank Usrs)
|
||||||
function make_comment_hex($str) {
|
function make_comment_hex($str) {
|
||||||
|
global $config;
|
||||||
// remove cross-board citations
|
// remove cross-board citations
|
||||||
// the numbers don't matter
|
// the numbers don't matter
|
||||||
$str = preg_replace('!>>>/[A-Za-z0-9]+/!', '', $str);
|
$str = preg_replace("!>>>/[A-Za-z0-9]+/!", '', $str);
|
||||||
|
|
||||||
|
if ($config['robot_enable']) {
|
||||||
if (function_exists('iconv')) {
|
if (function_exists('iconv')) {
|
||||||
// remove diacritics and other noise
|
// remove diacritics and other noise
|
||||||
// FIXME: this removes cyrillic entirely
|
// FIXME: this removes cyrillic entirely
|
||||||
@ -1348,6 +1350,7 @@ function make_comment_hex($str) {
|
|||||||
|
|
||||||
// strip all non-alphabet characters
|
// strip all non-alphabet characters
|
||||||
$str = preg_replace('/[^a-z]/', '', $str);
|
$str = preg_replace('/[^a-z]/', '', $str);
|
||||||
|
}
|
||||||
|
|
||||||
return md5($str);
|
return md5($str);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user