Feature #39682

Disregegard { as Fluid variable when followed by a white space

Added by Adrian Föder about 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Could have
Assignee:
-
Category:
Core
Target version:
-
Start date:
2012-08-10
Due date:
% Done:

0%

Estimated time:
Has patch:
No

Description

This is a reopen of an issue I had long time ago, so, long story short:

There's still the need for some CDATA wrapping when it comes to Javascript object notation, ie curly braces in JavaScript sections.

A great advantage, without much drawback, would be to disregard occurrences of braces that are followed by a white space, a tab or a newline. this means,

{f:this(is: 'a valid, regarded fluid variable'}
{so.is.thisVariant}
whereas
{ that: 'is an open brace followed by a whitespace, hence not a fluid variable'}

this maybe could be extended with every character not being \w or so, resulting in

{"alsoThis": "won't be fluid"}

Forcing Fluid syntax do directly follow the opening paranthese is legit in my opinion, you can still do

{f:if(
  condition: 'thisthat',
  then: 'foo',
  else: 'bar'
)};

in MySQL, for example, it's also required to make an open bracket follow the function name immediately: MAX( 5, 2) works, while MAX (5,2) won't.


Related issues

Related to TYPO3.Fluid - Bug #8879: { } when using as JavaScriptClosed2010-07-15

Actions
Related to TYPO3.Fluid - Bug #6338: JSON is being parsed as string ArrayClosed2010-02-04

Actions

Also available in: Atom PDF