diff --git a/code/dataobjects/Block.php b/code/dataobjects/Block.php
index 9b4f026..c1540ed 100644
--- a/code/dataobjects/Block.php
+++ b/code/dataobjects/Block.php
@@ -54,6 +54,16 @@ class Block extends DataObject
"RedirectionType" => "Internal"
);
+ private static $casting = array(
+ 'createStringAsHTML' => 'HTMLText'
+ );
+
+ public function createStringAsHTML($html){
+ $casted = HTMLText::create();
+ $casted->setValue($html);
+ return $casted;
+ }
+
public function populateDefaults()
{
$this->Template = $this->class;
@@ -177,7 +187,7 @@ public function getCMSFields()
// Is there a template thumbnail
$thumbnail = (file_exists($src . $name . '.png') ? '' : '
'); // TODO: Perhaps just add blank as alt for image, no need to check for existance?
$html = '