BUGFIX: Prevent DataDifferencer from creating empty <ins /> and <del /> 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
This commit is contained in:
Sam Minnee 2010-05-12 05:29:27 +00:00
parent e0b5c8f39f
commit 24b83db9c2

View File

@ -686,6 +686,10 @@ class Diff
$doc = new SS_HTMLValue($content); $doc = new SS_HTMLValue($content);
$content = $doc->getContent(); $content = $doc->getContent();
} }
// Remove empty <ins /> and <del /> tags because browsers hate them
$content = preg_replace('/<(ins|del)[^>]*\/>/','', $content);
return $content; return $content;
} }