Skip to content

Bug with enableHTML option and / in label #1290

@akiessling

Description

@akiessling

if (this.options.enableHTML && $(labelContent).length > 0) {

The label is passed to $(labelContent) --> when the labelContent has a / in it, jQuery complains about it

Uncaught Error: Syntax error, unrecognized expression: foo / bar

Is the wrapping in $() necessary? I'd probably just cast it to string or / and trim it

if (this.options.enableHTML && labelContent.toString().length > 0) {

PS: i'm still on the 1.x version, but the code stayed the same

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