Skip to content

[ExpressionLanguage] # character in a string literal #11433

Closed
@pylebecq

Description

@pylebecq

Hey there,

It seems # character in string literals breaks the expression parsing but only when using double quotes as a string delimiter.

Some pseudo code to illustrate this:

$language = new ExpressionLanguage();

// throws SyntaxError exception
$language->parse('user.getGroup() in ["#good_customers", "#collaborator"]', array('user')); 

// valid
$language->parse("user.getGroup() in ['#good_customers', '#collaborator']", array('user')); 

Does the # character mean something ? Why is there a difference between single and double quoted strings ?

I did not find anything related to this in the documentation, and I think the answers to these questions have to be documented somewhere.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions