diff options
Diffstat (limited to 'phpBB/includes/functions.php')
| -rw-r--r-- | phpBB/includes/functions.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 7be4eb6342..602d241578 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -423,6 +423,18 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add } // +// This does exactly what preg_quote() does in PHP 4-ish +// If you just need the 1-parameter preg_quote call, then don't bother using this. +// +function phpbb_preg_quote($str, $delimiter) +{ + $text = preg_quote($str); + $text = str_replace($delimiter, "\\" . $delimiter, $text); + + return $text; +} + +// // Obtain list of naughty words and build preg style replacement arrays for use by the // calling script, note that the vars are passed as references this just makes it easier // to return both sets of arrays |
