Bug #7518

FLuid breaks on HTML data-* attributes

Added by Morton Jonuschat over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-04-28
Due date:
% Done:

0%

Estimated time:
Has patch:

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

#1

Updated by Jochen Rau over 11 years ago

  • Assignee set to Sebastian Kurfuerst
#2

Updated by Sebastian Kurfuerst over 11 years ago

  • Assignee 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 over 11 years ago

  • Project changed from 534 to TYPO3.Fluid
  • Category deleted (431)
#4

Updated by Sebastian Kurfuerst over 11 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