aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_content.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-08-09 21:30:37 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-08-09 21:30:37 -0400
commitcad3e4cb453696d62abfdf90455d12140d215828 (patch)
treec0bec9ae2f3f76ea4031d2aeed4ca96adecf4313 /phpBB/includes/functions_content.php
parentb85cd7a431894e851d40e4fdf0611a0029b3ec50 (diff)
parentf9dbe33fa7917b6220a85a01ed9f395f3f1bb888 (diff)
downloadforums-cad3e4cb453696d62abfdf90455d12140d215828.tar
forums-cad3e4cb453696d62abfdf90455d12140d215828.tar.gz
forums-cad3e4cb453696d62abfdf90455d12140d215828.tar.bz2
forums-cad3e4cb453696d62abfdf90455d12140d215828.tar.xz
forums-cad3e4cb453696d62abfdf90455d12140d215828.zip
Merge remote-tracking branch 'callumacrae/ticket/10240' into develop-olympus
* callumacrae/ticket/10240: [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 b7650ecd6a..b34976db2a 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))
{