Bug #84970
closeddata-namespace-typo3-fluid doesn't work if no NS defined in <html> tag
0%
Description
With the template below
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en"
data-namespace-typo3-fluid="true">
{test}
</html>
the HTML tag would NOT get removed, because
$matched = preg_match('/<([a-z0-9]+)(?:[^>]*?)\\s+' . $namespacePattern . '[^>]*>/', $templateSource, $matches);
returns FALSE in \TYPO3Fluid\Fluid\Core\Parser\TemplateProcessor\NamespaceDetectionTemplateProcessor::registerNamespacesFromTemplateSource().
It works in TYPO3 v7.
Updated by Benni Mack over 6 years ago
- Target version changed from 8.7.13 to 8.7.19
Updated by Claus Due over 6 years ago
This isn't handled in TYPO3 CMS anymore, so the issue can be closed. A comment on the way: in the use case you present you are technically doing something that isn't sensible - by intentionally marking an element that doesn't contain Fluid NS definitions, as containing those.
Fluid in the non-v7 version does it a little differently (and less expensively). Among other things it allows you to use other tags than <html>. But even so, in my opinion it is not unreasonable to only treat those tags that actually contain Fluid NS definitions. The logic is that if a tag contains these, you may also want that tag removed entirely, which you can then indicate with this attribute. What I don't agree about is that this should be possible to do on arbitrary tags that don't carry NS definitions. It seems more appropriate to me that it only has any impact if there are NS attributes that get removed.
Updated by Riccardo De Contardi over 6 years ago
- Status changed from New to Closed
- Target version deleted (
8.7.19)
I close this one (see previous comment by Claus Due)
If you think that this is the wrong decision or that there is still something that should be done about this topic please open a new issue on https://github.com/TYPO3/Fluid/issues
Thank you