From 701df0d0bc93caebaf663b8c3c56deb352baa081 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 11 Sep 2005 05:25:41 +0000 Subject: [PATCH] Split the magical inline tags so we don't parse them except in the real case --- includes/svnlib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/svnlib.php b/includes/svnlib.php index 30d2b8c..ed154c0 100644 --- a/includes/svnlib.php +++ b/includes/svnlib.php @@ -101,8 +101,8 @@ class SVNLib } // convert advanced diff - $string = str_replace(array('{@++}', '{@--}'), array('', ''), $string); - $string = str_replace(array('{/@++}', '{/@--}'), '', $string); + $string = str_replace(array('{@+' . '+}', '{@-' . '-}'), array('', ''), $string); + $string = str_replace(array('{/@+' . '+}', '{/@-' . '-}'), '', $string); // nl2br $string = nl2br($string); @@ -830,13 +830,13 @@ class SVNDiff if (strlen($lastcontent) > $delta['endo'] - $diffo) { $removed = substr($lastcontent, $delta['start'], $diffo); - $this->diff["$index"]["$chunk"][ count($this->diff["$index"]["$chunk"]) - 2 ]['line'] = substr_replace($lastcontent, '{@--}' . $removed . '{/@--}', $delta['start'], $diffo); + $this->diff["$index"]["$chunk"][ count($this->diff["$index"]["$chunk"]) - 2 ]['line'] = substr_replace($lastcontent, '{@-' . '-}' . $removed . '{/@-' . '-}', $delta['start'], $diffo); } if (strlen($content) > $delta['endn'] - $diffn) { $added = substr($content, $delta['start'], $diffn); - $content = substr_replace($content, '{@++}' . $added . '{/@++}', $delta['start'], $diffn); + $content = substr_replace($content, '{@+' . '+}' . $added . '{/@+' . '+}', $delta['start'], $diffn); } } } -- 2.43.5