mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-29 20:59:23 +02:00
BUG Fix Security page showing double escaped HTML
This commit is contained in:
parent
26d46517ac
commit
fb6f8a0a04
@ -7,6 +7,7 @@ use SilverStripe\ORM\ArrayList;
|
|||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\ORM\DB;
|
use SilverStripe\ORM\DB;
|
||||||
use Controller;
|
use Controller;
|
||||||
|
use SilverStripe\ORM\FieldType\DBField;
|
||||||
use SS_HTTPRequest;
|
use SS_HTTPRequest;
|
||||||
use TemplateGlobalProvider;
|
use TemplateGlobalProvider;
|
||||||
use Deprecation;
|
use Deprecation;
|
||||||
@ -579,8 +580,8 @@ class Security extends Controller implements TemplateGlobalProvider {
|
|||||||
|
|
||||||
// Finally, customise the controller to add any form messages and the form.
|
// Finally, customise the controller to add any form messages and the form.
|
||||||
$customisedController = $controller->customise(array(
|
$customisedController = $controller->customise(array(
|
||||||
"Content" => $message,
|
"Content" => DBField::create_field('HTMLFragment', $message),
|
||||||
"Message" => $message,
|
"Message" => DBField::create_field('HTMLFragment', $message),
|
||||||
"MessageType" => $messageType,
|
"MessageType" => $messageType,
|
||||||
"Form" => $content,
|
"Form" => $content,
|
||||||
));
|
));
|
||||||
|
@ -809,9 +809,9 @@ abstract class HTMLEditorField_File extends ViewableData {
|
|||||||
protected function getDetailFields() {
|
protected function getDetailFields() {
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
ReadonlyField::create("FileType", _t('AssetTableField.TYPE','File type'), $this->getFileType()),
|
ReadonlyField::create("FileType", _t('AssetTableField.TYPE','File type'), $this->getFileType()),
|
||||||
ReadonlyField::create(
|
HTMLReadonlyField::create(
|
||||||
'ClickableURL', _t('AssetTableField.URL','URL'), $this->getExternalLink()
|
'ClickableURL', _t('AssetTableField.URL','URL'), $this->getExternalLink()
|
||||||
)->setDontEscape(true)
|
)
|
||||||
);
|
);
|
||||||
// Get file size
|
// Get file size
|
||||||
if($this->getSize()) {
|
if($this->getSize()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user