Actions
Bug #88900
closedIncorrect PHPDoc of "stdWrap_encodeForJavaScriptValue"
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
2019-08-02
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:
Description
In https://github.com/TYPO3/TYPO3.CMS/blob/e58f47f77855f8082ea19e4c0dd7aad1f02e08cb/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L2455, the PHPDoc of the method stdWrap_encodeForJavaScriptValue
is:
encodeForJavaScriptValue
Escapes content to be used inside JavaScript strings. No quotes are added around the value as this can easily be done in TypoScript
Although in https://github.com/TYPO3/TYPO3.CMS/blob/e58f47f77855f8082ea19e4c0dd7aad1f02e08cb/typo3/sysext/core/Classes/Utility/GeneralUtility.php#L3744, the return value of quoteJSvalue
is described as:
@return string the encoded value already quoted (with single quotes)
The PHPDoc of stdWrap_encodeForJavaScriptValue
is incorrect, the returned value is already quoted.
Actions