From 97fbfd3f128a1bfa1c27250e34bebd3e951d4051 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 4 Feb 2013 17:12:55 +0100 Subject: [PATCH] FIX Respect escaping rules on readonly fields in CMS history view Avoids showing unescaped HTML on fields which didn't allow it otherwise, e.g. TextField. This also fixes problems with SiteTree->ExtraMeta which got evaluated within the CMS. If this section contains any JavaScript it gets executed and can disrupt CMS operation. --- code/controllers/CMSPageHistoryController.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/controllers/CMSPageHistoryController.php b/code/controllers/CMSPageHistoryController.php index 846df975..9a8aca1e 100644 --- a/code/controllers/CMSPageHistoryController.php +++ b/code/controllers/CMSPageHistoryController.php @@ -113,11 +113,6 @@ class CMSPageHistoryController extends CMSMain { $fields = $fields->makeReadonly(); $navField->setAllowHTML(true); - foreach($fields->dataFields() as $field) { - $field->dontEscape = true; - $field->reserveNL = true; - } - if($compareID) { $link = Controller::join_links( $this->Link('show'),