Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linkify eats up HTML when facing certain types of input #313

Closed
cuuupid opened this issue Feb 10, 2021 · 0 comments
Closed

Linkify eats up HTML when facing certain types of input #313

cuuupid opened this issue Feb 10, 2021 · 0 comments
Labels
Milestone

Comments

@cuuupid
Copy link

cuuupid commented Feb 10, 2021

The input I'm using is essentially this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:rn="http://schemas.rightnow.com/crm/document">
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body style="FONT-FAMILY: Segoe UI, Verdana, sans-serif">

<div>
<div id="checksum" align="right">
<span style="font-size: 1pt">
[---002:000651:00385---]
</span>
</div>
</div>
</body>
</html>

When calling linkifyHtml on it, the content of the HTML gets eaten up into a comment like so:

<!---02:000651:00385---]
</span>
</div>
</div>
</body>
</html>-->

I'm not sure what's causing this but it seems to be related to the <!DOCTYPE> tag. Here is a more minimal example:

<!DOCTYPE>[--hello

gets converted to

<!--hello-->

I've already tried adding doctype and !doctype to ignoreTags but this doesn't seem to help.

nfrasser added a commit that referenced this issue Mar 11, 2021
@nfrasser nfrasser added this to the 3.0 milestone Mar 11, 2021
@nfrasser nfrasser added the bug label Mar 11, 2021
@nfrasser nfrasser mentioned this issue Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants