Project

General

Profile

Actions

Bug #84970

closed

data-namespace-typo3-fluid doesn't work if no NS defined in <html> tag

Added by Bill Dagou almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2018-05-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Benni Mack almost 6 years ago

  • Target version changed from 8.7.13 to 8.7.19
Actions #2

Updated by Claus Due almost 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.

Actions #3

Updated by Riccardo De Contardi almost 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

Actions

Also available in: Atom PDF