diff --git a/.styleci.yml b/.styleci.yml
new file mode 100644
index 0000000..1bfb879
--- /dev/null
+++ b/.styleci.yml
@@ -0,0 +1,34 @@
+preset: psr2
+
+enabled:
+ - no_leading_import_slash
+ - no_trailing_comma_in_singleline_array
+ - no_singleline_whitespace_before_semicolons
+ - no_unused_imports
+ - concat_with_spaces
+ - no_whitespace_in_blank_line
+ - ordered_imports
+ - single_quote
+ - no_extra_consecutive_blank_lines
+ - phpdoc_no_package
+ - phpdoc_scalar
+ - no_blank_lines_after_phpdoc
+ - short_array_syntax
+ - whitespace_after_comma_in_array
+ - function_typehint_space
+ - hash_to_slash_comment
+ - no_alias_functions
+ - lowercase_cast
+ - no_leading_namespace_whitespace
+ - native_function_casing
+ - no_empty_statement
+ - self_accessor
+ - no_short_bool_cast
+ - no_unneeded_control_parentheses
+
+finder:
+ name:
+ - "*.php"
+ not-path:
+ - ".Build"
+ - "Documentation"
diff --git a/Classes/Xclass/PaletteAndSingleContainer.php b/Classes/Xclass/PaletteAndSingleContainer.php
index 34f618b..5132e7a 100644
--- a/Classes/Xclass/PaletteAndSingleContainer.php
+++ b/Classes/Xclass/PaletteAndSingleContainer.php
@@ -3,9 +3,17 @@
namespace GeorgRinger\BackendDebug\Xclass;
use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
class PaletteAndSingleContainer extends \TYPO3\CMS\Backend\Form\Container\PaletteAndSingleContainer {
+ /**
+ * Wrap a single element
+ *
+ * @param array $element Given element as documented above
+ * @param array $additionalPaletteClasses Additional classes to be added to HTML
+ * @return string Wrapped element
+ */
protected function wrapSingleFieldContentWithLabelAndOuterDiv(array $element, array $additionalPaletteClasses = [])
{
$fieldName = $element['fieldName'];
@@ -22,7 +30,7 @@ protected function wrapSingleFieldContentWithLabelAndOuterDiv(array $element, ar
$label = BackendUtility::wrapInHelp($this->data['tableName'], $fieldName, htmlspecialchars($element['fieldLabel']));
if ($this->getBackendUser()->isAdmin()) {
- $label .= '[' . $fieldName . ']
';
+ $label .= '[' . htmlspecialchars($fieldName) . ']
';
}
$content = [];
$content[] = '