[FEATURE] Allow stripping of empty tags in HtmlParser 75/16975/19
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Mon, 2 Mar 2015 19:07:34 +0000 (20:07 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 2 Mar 2015 19:15:39 +0000 (20:15 +0100)
commit03bd2256e3d35c556ac1bad50a4554eeb32f1098
tree09217093b983f31327c0e6a6aa5b84c9e4392e68
parentb92f605b66cd93b41256e0c1425cccdd36789a9c
[FEATURE] Allow stripping of empty tags in HtmlParser

Add a stripEmptyTags method to the HtmlParser
It can be enabled by TypoScript or TSConfig:

HTMLparser.stripEmptyTags = 1
HTMLparser.stripEmptyTags.tags = h2, h3
HTMLparser.stripEmptyTags.treatNonBreakingSpaceAsEmpty = 1

Resolves: #20555
Releases: master
Change-Id: I640486e9f32da6ac1eba05e3c38d15a0aba41055
Reviewed-on: http://review.typo3.org/16975
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Documentation/Changelog/master/Feature-20555-StripEmptyHtmlTags.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Html/HtmlParserTest.php