From 2b3b0c84ebf22fa2334e6390ab1717ee101936eb Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 3 Apr 2018 16:39:50 +1200 Subject: [PATCH] FIX Cast IFrameURL right title as HTMLText to avoid double escaping --- src/IFramePage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/IFramePage.php b/src/IFramePage.php index 2e08bbf..fffe512 100644 --- a/src/IFramePage.php +++ b/src/IFramePage.php @@ -7,6 +7,7 @@ use SilverStripe\Forms\DropdownField; use SilverStripe\Forms\CheckboxField; use SilverStripe\Forms\NumericField; use SilverStripe\Forms\HTMLEditor\HtmlEditorField; +use SilverStripe\ORM\FieldType\DBField; /** * Iframe page type embeds an iframe of URL of choice into the page. @@ -46,7 +47,10 @@ class IFramePage extends Page $fields->removeFieldFromTab('Root.Main', 'Content'); $fields->addFieldToTab('Root.Main', $url = new TextField('IFrameURL', 'Iframe URL')); $url->setRightTitle( - 'Can be absolute (http://silverstripe.com) or relative to this site (about-us).' + DBField::create_field( + 'HTMLText', + 'Can be absolute (http://silverstripe.com) or relative to this site (about-us).' + ) ); $fields->addFieldToTab( 'Root.Main',