aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/diff/diff.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
index 59124ae7ef..430ae0f522 100644
--- a/phpBB/includes/diff/diff.php
+++ b/phpBB/includes/diff/diff.php
@@ -50,11 +50,8 @@ class diff
{
$diff_engine = &new diff_engine();
- $match = array('#\r\n?#', "#([\n]+){2,}#u");
- $replace = array("\n", "\n");
-
- $from_content = preg_replace($match, $replace, $from_content);
- $to_content = preg_replace($match, $replace, $to_content);
+ $from_content = preg_replace('#[\n\r]+#', "\n", $from_content);
+ $to_content = preg_replace('#[\n\r]+#', "\n", $to_content);
$this->_edits = call_user_func_array(array($diff_engine, 'diff'), array(explode("\n", $from_content), explode("\n", $to_content)));
}