Skip to content

Broken escaping in templating export #3381

@wetneb

Description

@wetneb

Curly braces are used in the templating exporter to delimit expressions from the rest of the template text. Therefore if we want to use curly braces in the expressions they need to be escaped. According to the code, we are supposed to do this with \{, but that does not actually work.

To Reproduce

Steps to reproduce the behavior:

  1. First, open any project
  2. Then, open the templating export dialog
  3. Finally, input the following template:
{{"\}\}"}}

This is supposed to evaluate to just }} for each row.

Current Results

We get {{"\}\}"}} instead.

Expected Behavior

We should get }}

Versions

  • Operating System: Linux
  • Browser Version: irrelevant
  • JRE or JDK Version: 11
  • OpenRefine: 3.4.1

Additional context

Brought up while trying to document the templating exporter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugIssues related to software defects or unexpected behavior, which require resolution.export: templateAbout the custom templating exporter

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions