Skip to content

Underscore extractor does not properly handle escaped characters #8

@amangano-edx

Description

@amangano-edx

The underscore template extractor does not seem to be able to properly parse strings that contain escaped characters. Such strings end up being written to the .pot file with extra escape characters.

Consider the following example:

An underscore template containing the following lines:

<%- gettext('foo\\bar') %>
<%- gettext('Bob\'s house') %>

Produces the following output in the .pot file generated by Babel:

msgid "foo\\\\bar"
msgstr ""

msgid "Bob\\'s house"
msgstr ""

This does not seem to be correct.

Please let me know if there's anything I can do to help fix this issue.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions