Remove HTML Tags from dashboard widget labels

BackendUtility::getRecordTitle might contain HTML tags like "span".
Those might result in broken rendering. As we don't need this markup
anyway, we remove it.
This commit is contained in:
Daniel Siepmann 2020-08-04 08:14:41 +02:00
parent 1cbec2e51d
commit 42f75a75a0
2 changed files with 2 additions and 2 deletions

View file

@ -163,6 +163,6 @@ class PageviewsPerPage implements ChartDataProviderInterface
$record = $this->pageRepository->getRecordOverlay('pages', $record, $sysLanguageUid);
}
return BackendUtility::getRecordTitle('pages', $record, true);
return strip_tags(BackendUtility::getRecordTitle('pages', $record, true));
}
}

View file

@ -216,7 +216,7 @@ class Recordviews implements ChartDataProviderInterface
}
return [
'title' => BackendUtility::getRecordTitle($table, $record, true),
'title' => strip_tags(BackendUtility::getRecordTitle($table, $record, true)),
'type' => $record[$recordTypeField] ?? '',
];
}