Skip to content

Second Parameter for unescape modifier not working #777

@attrib

Description

@attrib

I'm not sure if I'm doing it just wrong or if there is a bug in the unescape modifier

What I'm trying is something like this

{$content|unescape:'htmlall':'utf-8'}

This results in:

<?php echo html_entity_decode($content, ENT_NOQUOTES, ''utf-8'');?>

Looking into the code, I see that there is $params[ 2 ] = "'{$params[ 2 ]}'"; - but somehow it is already in quotes.

For params[1] it does a trim for " and ' - why not for params[2]?

On a side note, even if I not using it, but I tested it now while debugging this issue:

{$content|unescape:'htmlall':$encoding}

results in

<?php echo html_entity_decode($content, ENT_NOQUOTES, '$encoding');?>

so its not working $encoding is inside single quote.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions