Skip to content

Javascript gets executed when the tooltip content has javascript script #69

@sabinbogati1

Description

@sabinbogati1

Hi,
So i came up with this issue where if the content data has JavaScript code script then its gets executed.

Examples:

const data = {
  "email": "<img src=x onerror=prompt(1)>@x.y",
  "firstName": "Sabin",
  "lastName": "Bogati"
}

<Tooltip content={JSON.stringify(data, null, 2)} className="json-tooltip">
  <span className="text-body">
    Placeholder....
  </span>
</Tooltip>

how do i disable JavaScript from executing?

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