Bug #88900
closedIncorrect PHPDoc of "stdWrap_encodeForJavaScriptValue"
100%
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.
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61413
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61362
Updated by Felix Heller over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d0a628159370732f83068a4991d02a231021a133.