Skip to content

'unsafe-eval' is not an allowed source of script #733

@reckerswartz

Description

@reckerswartz

tokenized_length = new Function('element', "return (element.val().#{tokenizer} || '').length")(element)

fn = new Function("return #{tokenized_length} #{operator} #{options[check]}")

Above line of codes produces error

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive.

helpful links:-

Environment

  • Version used: 11.1
  • Browser Name and version: Google Chrome Version 64.0.3282.140 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): Windows 10 Pro (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions