Skip to content

Incorrect parsing of strings containing multiple dots '.' assigned in template #30

@brokencube

Description

@brokencube

If a string is assigned to a variable in a template and contains multiple dot characters, the parser will assume that we are trying to reference an array for all but the last dot, even without a dollar sign.

Example:

{$temp1='first.second'}
{$temp2='first.second.third'}
{$temp3='first.second.third.fourth'}
{$temp1}
{$temp2}
{$temp3}

Expected output:

first.second
first.second.third
first.second.third.fourth

Actual output:

first.second
first["second"].third
first["second"]["third"].fourth

Tested using current master (dev-master 82da191)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions