diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-08-09 21:30:37 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-08-09 21:30:37 -0400 |
commit | cad3e4cb453696d62abfdf90455d12140d215828 (patch) | |
tree | c0bec9ae2f3f76ea4031d2aeed4ca96adecf4313 /phpBB/includes/functions_content.php | |
parent | b85cd7a431894e851d40e4fdf0611a0029b3ec50 (diff) | |
parent | f9dbe33fa7917b6220a85a01ed9f395f3f1bb888 (diff) | |
download | forums-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.php | 3 |
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)) { |