#104738Fluid inline ternary operator breaks on special characters
Description
The code (line 14) should return the string “fal-se”, but fails to do so and just displays the source-code on the web page.
I suspect the hyphen is the problem as without it, it works just fine (line 11). The problem only exists on the ternary operator as the code in line 13 works just fine.
I tried escaping the hyphen with a backslash, but it didn’t help.
Please see the picture for clarification on what’s the problem.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 1
History 3
-
Simon Schaufelberger changed description <span data-processor="relativetime" data-value="2025-03-11T18:55:29+00:00" > 03/11/25, 18:55 </span>
-
Simon Schaufelberger changed description <span data-processor="relativetime" data-value="2025-03-11T18:56:08+00:00" > 03/11/25, 18:56 </span>
-
Garvin Hicking commented and changed status
NewRejected <span data-processor="relativetime" data-value="2025-03-11T19:13:09+00:00" > 03/11/25, 19:13 </span>
Thanks for the report! However I need to close this here for these reasons:
- the issue affects typo3fluid as a standalone issue and would not be tracked here
- the docs at https://docs.typo3.org/other/typo3fluid/fluid/main/en-us/Syntax/Expressions.html#ternary-expressions mention the expression must not be used for strings
- the issue https://github.com/TYPO3/Fluid/issues/212 deals with this and would be the “lead” issue for possible future changes
Thanks again,
Garvin