Skip to content

Commit

Permalink
DOCS Update sample code to avoid HTML tags being escaped and rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
raissanorth committed Jan 22, 2018
1 parent 231f195 commit b85c9bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -220,7 +221,7 @@ class PageController extends ContentController
{
return [
'Title' => 'Thank you for your submission',
'Content' => '<p>You have successfully submitted the form!</p>'
'Content' => DBHTMLText::create('<p>You have successfully submitted the form!</p>')
];
}
}
Expand Down

0 comments on commit b85c9bb

Please sign in to comment.