Skip to content

Replace filter: unescape backslashes #109

@djbe

Description

@djbe

In a template, if I try:
value|replace:"\n","\\n"

The search and replace strings become "\\n" and "\\\\n" respectively. I think we should un-escape these backslashes, so that users correctly can search for newlines (for example). Or is this something that we should handle in Stencil itself?

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