Skip to content

Refactor render and echo twig for proper escaping on echo #126

@rianrietveld

Description

@rianrietveld

In clarkson-core-templates.php the functions echo_twig, render_twig, echo_json and render_json need to be refactored, so that an escape can be done with the echo of the template.

$this->render_twig( $template_file, $objects, $ignore_warning );
echo $this->render_json( $objects );

Research how XWP renders templates: https://github.com/xwp/wp-vip-twig/blob/649703c3fcfea8f0f3dc6c8f35f17b110feba7ce/php/class-twig-environment.php#L103

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