From a52f572f1e4e726168be7dfbca9219c3e90b51be Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 15 Oct 2010 01:38:52 +0000 Subject: [PATCH] BUGFIX: Prevent DataDifferencer from creating empty and takes that confuse the browser. (from r104675) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112458 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; }