From 8a8501c8544cf8063c3ae25640b89a0fd7099f4b Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 12 Apr 2010 03:31:35 +0000 Subject: [PATCH] FEATURE: Use tidied HTML in DataDifferencer (from r97018) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102420 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataDifferencer.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/model/DataDifferencer.php b/core/model/DataDifferencer.php index d0dcf5857..63b4a0fab 100644 --- a/core/model/DataDifferencer.php +++ b/core/model/DataDifferencer.php @@ -111,9 +111,11 @@ class DataDifferencer extends ViewableData { $changedFields->push(new ArrayData(array( 'Name' => $field, 'Title' => $base->fieldLabel($field), - 'Diff' => $this->fromRecord - ? Diff::compareHTML($this->fromRecord->$field, $this->toRecord->$field) - : "" . $this->toRecord->$field . "", + 'Diff' => new SS_HTMLValue( + $this->fromRecord + ? Diff::compareHTML($this->fromRecord->$field, $this->toRecord->$field) + : "" . $this->toRecord->$field . "" + ), 'From' => $this->fromRecord ? $this->fromRecord->$field : null, 'To' => $this->toRecord ? $this->toRecord->$field : null, )));