Skip to content

Commit

Permalink
Merge pull request #72 from creative-commoners/pulls/2.0/update-docum…
Browse files Browse the repository at this point in the history
…entation

Update section 5 in the sample code to avoid HTML tags being escaped and rendered
  • Loading branch information
robbieaverill authored Jan 23, 2018
2 parents 231f195 + b85c9bb commit d3c5794
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 d3c5794

Please sign in to comment.