From b85c9bb383eed39867e97e4de72139d868ddc737 Mon Sep 17 00:00:00 2001 From: Raissa North Date: Tue, 23 Jan 2018 10:51:40 +1300 Subject: [PATCH] DOCS Update sample code to avoid HTML tags being escaped and rendered --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 240457f..d5f2b25 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,7 @@ template, we need to create a SurveyForm method (function) on the controller: ```php use SilverStripe\CMS\Controllers\ContentController; +use SilverStripe\ORM\FieldType\DBHTMLText; class PageController extends ContentController { @@ -220,7 +221,7 @@ class PageController extends ContentController { return [ 'Title' => 'Thank you for your submission', - 'Content' => '

You have successfully submitted the form!

' + 'Content' => DBHTMLText::create('

You have successfully submitted the form!

') ]; } }