40139[FEATURE] Fluid Tag Builder: Allow empty attributes
Commit message
Review
-
Code review CR +2
- Anja Leichsenring +2
- Markus Klein +1
-
Verified V +2
- Anja Leichsenring +2
- Markus Klein +1
Issues 1
Files 5
- typo3/sysext/core/Documentation/Changelog/master/Feature-67372-AllowEmptyAttributeSyntaxInFluidTagBuilder.rst2new+27 −0
- typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php5+5 −1
- typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractTagBasedViewHelperTest.php+14 −0
- typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TagBuilderTest.php3+15 −0
Review log 28
Show 3 earlier messages
-
Sebastian Michaelsen uploaded patch set 1 06/09/15, 20:48
-
Morton Jonuschat commented on patch set 1 06/09/15, 21:04
This produces invalid markup when XHTML doctypes are being used, full attribute form is required in that case. -
Markus Klein commented on patch set 1 06/09/15, 22:02
Those half-baked HTML5 pseudo attributes are one of the worst things they ever introduced and those optional end-tags being the worst. HTML is for machines and not for humans => stick to good old XHTML standards just my 2 cents
-
Sebastian Michaelsen uploaded patch set 2 06/10/15, 06:25
-
Sebastian Michaelsen commented on patch set 2 06/10/15, 06:30
@Morton: Thanks, I updated the code accordingly @Markus: I see, but if you dislike HTML5 you are still free to choose XHMTL. Besides I think HTML is not just for machines but for developers (crafting and debugging it) as well. -
Sebastian Michaelsen commented on patch set 2 06/10/15, 06:39
Additional explanation to this patch: It not only enables the empty attribute syntax but also you to put arbitrary content inside your tag, which can be desirable. E.g. I'm using Fluid to output a marker based template for EXT:formhandler, which expects certain markers inside tags. Without the change I can not achieve that. -
Morton Jonuschat commented on patch set 2 CR +1 V +1 06/10/15, 07:06
verified by unit tests. -
Mathias Brodala commented on patch set 2 CR -1 06/10/15, 07:24
I'd like to clarify first if NULL is a viable alternative.Feature-67372-AllowEmptyAttributeSyntaxInFluidTagBuilder.rst:24What if I want data-foo=""? I'd vote for making the value optional instead, thus $this->tag->addAttribute('disabled');TagBuilder.php:172How about defaulting to NULL instead to allow for skipping the value altogether?TagBuilder.php:173Skip this if $attributeValue is NULL.TagBuilder.php:229IMO this check is not necessary. -
Markus Sommer commented on patch set 2 CR -1 V -1 07/17/15, 09:06
HTML5 allows both. Old an new Syntax. We realy need this Patch -
Patrick Kollodzik uploaded patch set 3 07/17/15, 19:54
-
Patrick Kollodzik commented on patch set 3 CR +1 V +1 07/17/15, 20:00
Tested it with an empty string and only with the attribute. The AbstractTagBasedViewhelper filters out every attribute without a value. We changed this behaviour and added a unit test for this case. If you wish to use attributes like disabled without ="" then there is further work needed, because the template compiling breaks. -
Xavier Perseguers voted on patch set 3 CR +1 V +1 07/17/15, 23:09
-
Markus Klein commented on patch set 3 07/18/15, 08:28
Feature-67372-AllowEmptyAttributeSyntaxInFluidTagBuilder.rst:17needs one more blank line beforeTagBuilderTest.php:119where do you define TSFE? -
Stefan Neufeind uploaded patch set 4 07/18/15, 08:52
-
Stefan Neufeind commented on patch set 4 07/18/15, 08:53
Took care of small comments from Markus. Please revote. -
Markus Klein uploaded patch set 5 07/18/15, 09:01
-
Markus Klein commented on patch set 3 07/18/15, 09:01
TagBuilderTest.php:119Replyok, dirty but works -
Markus Klein voted on patch set 5 CR +1 V +1 07/18/15, 09:02
-
Anja Leichsenring voted on patch set 5 CR +2 V +2 07/18/15, 09:06
-
Anja Leichsenring merged patch set 5 07/18/15, 09:06
-
Helmut Hummel commented on patch set 6 07/22/15, 16:56
post -1 with tendency to -2 This patch is broken on many levels -
Stefan Neufeind commented on patch set 6 07/22/15, 16:59
Could you please be a bit more verbose? :-( -
Helmut Hummel commented on patch set 6 07/22/15, 17:01
TagBuilder.php:2291. This introduces a hard dependency to a TYPO3 specific global object 2. TSFE->config->doctype is NULL when the default (html5) kicks in, so the check is broken here anywayTagBuilder.php:2303. This renders e.g. <img alt /> instead of <img alt="" /> Only "Certain attributes may be specified by providing just the attribute name, with no value." (http://www.w3.org/TR/html-markup/syntax.html#syntax-attributes)TagBuilderTest.php:127these should rather be two test methods -
Helmut Hummel commented on patch set 6 07/22/15, 17:03
I'm not saying that this could be implemented cleanly (which it currently is unfortunately not). But what would we win, besides supporting a code style, while other code style still are valid HTML5 -
Stefan Neufeind commented on patch set 6 07/22/15, 17:07
Hmm, valid objections. In that light, I'd suggest to revert it for the moment until after a more lengthy discussion / better ideas to solve it. -
Marc Bastian Heinrichs commented on patch set 6 07/22/15, 18:11
broken code-wise, testcode-wise and functional-wise, so -2 and -2 after merge. I'm also in favour of a revert, than doing a follow up. -
Helmut Hummel commented on patch set 6 07/22/15, 18:36
Reverted This patchset was reverted in change: Idd0af9d3164adc91a7e8ad9e0c554467cce0d233 -
Helmut Hummel commented on patch set 6 07/22/15, 18:39