From 24b83db9c2a5ada218fc72e35b5bf64c6e5dee5f Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 12 May 2010 05:29:27 +0000 Subject: [PATCH] BUGFIX: Prevent DataDifferencer from creating empty and takes that confuse the browser. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@104675 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/Diff.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/Diff.php b/code/Diff.php index b7c5f9d9..708cc814 100755 --- a/code/Diff.php +++ b/code/Diff.php @@ -686,6 +686,10 @@ class Diff $doc = new SS_HTMLValue($content); $content = $doc->getContent(); } + + // Remove empty and tags because browsers hate them + $content = preg_replace('/<(ins|del)[^>]*\/>/','', $content); + return $content; }