TYPO3 / Fluid

Fluid template rendering engine - Standalone version
GNU Lesser General Public License v3.0
153 stars 93 forks source link

[BUGFIX] Restore previous empty tag attribute behavior #943

Closed s2b closed 1 month ago

s2b commented 1 month ago

With Fluid 2.12, we introduced the ability to provide arbitrary ViewHelper arguments to TagBasedViewHelpers. Consequently, we deprecated the method registerTagAttribute(), which is no longer necessary due to the mentioned change.

However, the implementations differed until now: The previous implementation ignored empty strings for tag attributes, while the new implementation added such input as empty attribute to the resulting tag. We now check for empty strings and null and only add attributes to the tag if it passes those tests. Also, attribute values are converted to string.

This patch adds tests to ensure that the behavior is consistent, both for registered and unregistered tag attributes. It also ensures that the inline syntax behaves identically to the tag syntax.