Skip to content

filter escapeJs prints empty js object for php objects like strings (with__toString()) #78

@iinfo-dev-mk

Description

@iinfo-dev-mk

Common problem is Nette\Http\Url, which string like behaviour is supported through whole Nette framework, but if it's set into template and ends in some javascript context, filter prints just '{}', this is serious bug.

Simple test case

 echo Latte\Runtime\Filters::escapeJs(new Nette\Http\Url("http://seznam.cz"));

prints "{}", expected is "http://seznam.cz"

tested with 2.2 branch and latest stable php 5.6

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