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, )));