[FOLLOWUP][TASK] Deprecate removeBadHTML
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Deprecation-15415-DeprecateRemoveBadHTML.rst
1 =============================================
2 Deprecation: #15415 - Deprecate removeBadHTML
3 =============================================
4
5 Description
6 ===========
7
8 Due to the wrong approach of removeBadHTML it is not 100% complete and does not keep its promise.
9
10 - :php:``ContentObjectRenderer::stdWrap_removeBadHTML()``
11 - :php:``ContentObjectRenderer::removeBadHTML()``
12 - :typoscript:``stdWrap.removeBadHTML``
13
14
15 Impact
16 ======
17
18 Using the mentioned method or stdWrap property will trigger a deprecation log entry.
19
20
21 Affected Installations
22 ======================
23
24 Instances that use the method or stdWrap property.
25
26
27 Migration
28 =========
29
30 Implement a proper encoding by yourself. Use :php:``htmlspecialchars()`` or :typoscript:``stdWrap.htmlSpecialChars``
31 in the context of HTML, :php:``GeneralUtility::quoteJSvalue()`` or :typoscript:``stdWrap.encodeForJavaScriptValue``
32 in the context of JavaScript.