Skip to content

The value of window.__karma__.files is not properly escaped #1876

@Joris-van-der-Wel

Description

@Joris-van-der-Wel

One of the files being served in my project has a single quote in its name. Karma is unable to run any tests because of this.

This is the culprit:

mappings = 'window.__karma__.files = {\n' + mappings.join(',\n') + '\n};\n'

Why not use JSON.stringify()?

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