Deprecation: #85120 - JavaScriptEncoder

See Issue #85120

Description

The standalone utility class TYPO3\CMS\Core\Encoder\JavaScriptEncoder has been superseded in TYPO3 6.2 by PHP's native json_encode() and GeneralUtility::quoteJSvalue() which provide significant performance improvements. The utility class is thus marked for removal in TYPO3 v10.0.

Impact

Instantiating the class will trigger a PHP E_USER_DEPRECATED error.

Affected Installations

TYPO3 installations with custom extensions using this PHP class.

Migration

Use GeneralUtility::quoteJSvalue() or json_encode() with proper options as second parameter to escape a string for JavaScript output.