diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80440-EXTlowlevelArrayBrowser-wrapValue.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80440-EXTlowlevelArrayBrowser-wrapValue.rst new file mode 100644 index 0000000000000000000000000000000000000000..5d98c5c45c5dd175cdf051f87cccbddd8846b20b --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80440-EXTlowlevelArrayBrowser-wrapValue.rst @@ -0,0 +1,33 @@ +.. include:: ../../Includes.txt + +========================================================== +Deprecation: #80440 - EXT:lowlevel ArrayBrowser->wrapValue +========================================================== + +See :issue:`80440` + +Description +=========== + +The method ``ArrayBrowser->wrapValue`` in EXT:lowlevel has been marked as deprecated, since the sole +logic was to wrap the incoming string into htmlspecialchars(). + + +Impact +====== + +Calling the method will trigger a deprecation warning. + + +Affected Installations +====================== + +Any TYPO3 installation using the EXT:lowlevel ArrayBrowser class in a custom extension. + + +Migration +========= + +Remove the call to the method and directly use ``htmlspecialchars()`` instead. + +.. index:: PHP-API \ No newline at end of file diff --git a/typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php b/typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php index 198f2c5153bf4f34755f76df71e544f3070e521a..b6b7709de68f2247604e4f0eb24d4a8130181c3e 100644 --- a/typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php +++ b/typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php @@ -114,7 +114,7 @@ class ArrayBrowser $output .= '<span class="list-tree-group">'; $output .= $this->wrapArrayKey($key, $depth, !$isArray ? $value : ''); if (!$isArray) { - $output .= ' = <span class="list-tree-value">' . $this->wrapValue($value) . '</span>'; + $output .= ' = <span class="list-tree-value">' . htmlspecialchars($value) . '</span>'; } $output .= '</span>'; if ($isExpanded) { @@ -134,9 +134,11 @@ class ArrayBrowser * * @param string $theValue The title string * @return string Title string, htmlspecialchars()'ed + * @deprecated since TYPO3 v8, will be removed in TYPO3 v9 */ public function wrapValue($theValue) { + GeneralUtility::logDeprecatedFunction(); $wrappedValue = ''; if ((string)$theValue !== '') { $wrappedValue = htmlspecialchars($theValue);