diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-08-27 02:28:04 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-08-27 02:28:04 +1000 |
| commit | 6a705fd8c2324b642ac6bfc660d76cff6d5eab62 (patch) | |
| tree | 7f916bebf46f66ed55569ea1456686524aebc192 /inc/anti-bot.php | |
| parent | 1dcb385e9e3791d2d3c1d049fe9b8d906539088e (diff) | |
| parent | c919e7362542117f613c2800017ae89c269a07b5 (diff) | |
Merge branch 'mod-rewrite'
Conflicts:
inc/lib/Twig/Extensions/Extension/Tinyboard.php
install.php
mod.php
stylesheets/style.css
templates/index.html
templates/page.html
templates/thread.html
Diffstat (limited to 'inc/anti-bot.php')
| -rw-r--r-- | inc/anti-bot.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/inc/anti-bot.php b/inc/anti-bot.php index 81afca1b..716e301c 100644 --- a/inc/anti-bot.php +++ b/inc/anti-bot.php @@ -19,7 +19,7 @@ class AntiBot { if ($uppercase) $chars .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; if ($special_chars) - $chars .= ' ~!@#$%^&*()_+,./;\'[]\\{}|:"<>?=-` '; + $chars .= ' ~!@#$%^&*()_+,./;\'[]\\{}|:<>?=-` '; $chars = str_split($chars); @@ -48,8 +48,9 @@ class AntiBot { foreach ($chars as &$c) { if (rand(0, 2) != 0) - continue; - $c = mb_encode_numericentity($c, array(0, 0xffff, 0, 0xffff), 'UTF-8'); + $c = utf8tohtml($c); + else + $c = mb_encode_numericentity($c, array(0, 0xffff, 0, 0xffff), 'UTF-8'); } return implode('', $chars); |
