Skip to content

Linkify is not splitting out the link from the text correctly #511

@DarynHolmes

Description

@DarynHolmes

According to the docs when you have a string such as this: <script src="https://evil.h4ckz.example.com/hack.js"></script>

Linkify creates a text node for <script src=", an anchor tag node with href https://evil.h4ckz.example.com/hack.js and a final text node for "></script>.

This is not what is happening. It includes the "></script> as a part of the link. I have verified this by testing this locally and by using https://linkify.js.org/

Image

It works when there is just a quote after the url

Image

It does not work when any letter follows the last quote

Image

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions