mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-07 07:01:29 +01:00
Fix for last commit
This commit is contained in:
parent
9a14d32c77
commit
d9dfed5e1c
@ -1552,8 +1552,9 @@ function ordutf8($string, &$offset) {
|
|||||||
function strip_combining_chars($str) {
|
function strip_combining_chars($str) {
|
||||||
$chars = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
$chars = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
||||||
$str = '';
|
$str = '';
|
||||||
foreach ($chars as $char) {
|
foreach ($chars as $char) {
|
||||||
$ord = ordutf8($char, $o = 0);
|
$o = 0;
|
||||||
|
$ord = ordutf8($char, $o);
|
||||||
|
|
||||||
if ($ord >= 768 && $ord <= 879)
|
if ($ord >= 768 && $ord <= 879)
|
||||||
continue;
|
continue;
|
||||||
|
2
post.php
2
post.php
@ -360,7 +360,7 @@ if (isset($_POST['delete'])) {
|
|||||||
if ($config['strip_combining_chars']) {
|
if ($config['strip_combining_chars']) {
|
||||||
$post['name'] = strip_combining_chars($post['name']);
|
$post['name'] = strip_combining_chars($post['name']);
|
||||||
$post['email'] = strip_combining_chars($post['email']);
|
$post['email'] = strip_combining_chars($post['email']);
|
||||||
$post['subject'] = strip_combining_chars($post['name']);
|
$post['subject'] = strip_combining_chars($post['subject']);
|
||||||
$post['body'] = strip_combining_chars($post['body']);
|
$post['body'] = strip_combining_chars($post['body']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user