aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_content.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-08-09 21:33:36 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-08-09 21:33:36 -0400
commit4754e11d67da22f2c4674a5f8d8c39af6a8e7ca1 (patch)
treefa88c4f47bd44f3021d61834b48be2e8ca9c9d4d /phpBB/includes/functions_content.php
parent55e4dfd3bd10029b5d3b4f5f0037a18517e4017d (diff)
parentcad3e4cb453696d62abfdf90455d12140d215828 (diff)
downloadforums-4754e11d67da22f2c4674a5f8d8c39af6a8e7ca1.tar
forums-4754e11d67da22f2c4674a5f8d8c39af6a8e7ca1.tar.gz
forums-4754e11d67da22f2c4674a5f8d8c39af6a8e7ca1.tar.bz2
forums-4754e11d67da22f2c4674a5f8d8c39af6a8e7ca1.tar.xz
forums-4754e11d67da22f2c4674a5f8d8c39af6a8e7ca1.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10240] Added code to strip control characters from messages.
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r--phpBB/includes/functions_content.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index b1294a2f14..63e4a16fb6 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -691,6 +691,9 @@ function censor_text($text)
return '';
}
+ // Strip control characters
+ $text = preg_replace('/[\x00-\x0f]/', '', $text);
+
// We moved the word censor checks in here because we call this function quite often - and then only need to do the check once
if (!isset($censors) || !is_array($censors))
{