Merge pull request #201 from silverstripe/pulls/2.0/escape-panel-keys

FIX Ensure actions panel keys and values have possible HTML escaped
This commit is contained in:
Dylan Wagstaff 2017-12-06 14:01:31 +13:00 committed by GitHub
commit 82a8a4b142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1320,6 +1320,9 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
. '<ul>';
foreach ($this->actionTasks as $panelKey => $title) {
$panelKey = Convert::raw2xml($panelKey);
$title = Convert::raw2xml($title);
$html .= '<li class="ss-ui-button dmsdocument-action" data-panel="' . $panelKey . '">'
. _t('DMSDocument.ACTION_' . strtoupper($panelKey), $title)
. '</li>';