Skip to content

error on javascript containing backtick (`) multi-line string #296

Description

@refacktor

I'm not sure if this is a bug or a feature request.

Stack Trace:

Exception class=[net.sourceforge.htmlunit.corejs.javascript.EvaluatorException]
com.gargoylesoftware.htmlunit.ScriptException: unterminated string literal (http://localhost/agent/clientlibs/scripts/ho
me-table.js#30)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:949)
	at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:619)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:537)
	at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured(HtmlUnitContextFactory.java:353)

The js file it's complaining about looks like this:

				render: (data, type, row, meta) => {
					return `<div>                           // <=== this is line 30
			            <i class="user-id">ID: ${row.userId}</i>

                                      ... `; }

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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