Bug #7518

FLuid breaks on HTML data-* attributes

Added by Morton Jonuschat over 5 years ago. Updated almost 5 years ago.

Status:Closed Start date:2010-04-28
Priority:Won't have this time Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-
Has patch: Affected Flow version:

Description

Trying to use HTML5 data-* attributes in Fluid ViewHelpers breaks rendering in different ways, depending on the ViewHelper called.

For example f:link.action doesn't parse the tag completly, rendering breaks with "You closed a templating tag which you never opened!"

Adding a data-* attribute to f:form.textbox results in the unparsed tag being put into the resulting html.

Regarding the use of data-* tags see the official W3 documentation:

http://dev.w3.org/html5/spec/Overview.html#attr-data

Bug experienced on Extbase/Fluid included with TYPO3 4.4.0beta1

History

#1 Updated by Jochen Rau over 5 years ago

  • Assigned To set to Sebastian Kurfuerst

#2 Updated by Sebastian Kurfuerst about 5 years ago

  • Assigned To deleted (Sebastian Kurfuerst)
  • Priority changed from Should have to Could have

This is because all Fluid tag attributes need to be registered properly, and this has not been registered.

Normally, you can use additionalAttributes to add additional tag attributes, but I guess that the "-" in the identifier is not supported. That's why I'll leave this ticket open for now.

#3 Updated by Sebastian Kurfuerst about 5 years ago

  • Project changed from Extbase MVC Framework to TYPO3.Fluid
  • Category deleted (431)

#4 Updated by Sebastian Kurfuerst about 5 years ago

  • Status changed from New to Closed
  • Priority changed from Could have to Won't have this time

Hey,

I have just checked again, and Fluid indeed supports the "-" as valid array key. So, the following should work (additionalAttributes works on all TagBased view helpers):

<f:link.action ..... additionalAttributes="{data-foo: '12345', data-bar: 'blahblah'}">...</f:link.action>

That's why I'm closing this ticket for now. If it does not work, feel free to re-open it.

Greets,
Sebastian

Also available in: Atom PDF