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

DOCTYPE statement with external identifier getting trimmed to <DOCTYPE html> #130

Open
talenthub-js opened this issue Apr 23, 2024 · 0 comments

Comments

@talenthub-js
Copy link

It seems that inline-css is truncating the "external identifier" part of DOCTYPE.

Consider this example

const inlineCss = require('inline-css')
inlineCss(
  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html></html>',
  { url:'file://test.html' }
).then(console.debug)
// <!DOCTYPE html><html><head></head><body></body></html>

Versions:

Node: v20.12.0
inline-css: 4.0.2

While browsers ignore most parts of DOCTYPE, this may be relevant for emails. I suspect this comes from Cheerio, but since inline-css puts more focus on emails, figured it may be more relevant to ask here. Is this the expected behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant