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

Fix #1804: remove <!doctype html> and accept invalid HTML #1851

Merged
merged 2 commits into from
Aug 19, 2020

Conversation

Hocuri
Copy link
Collaborator

@Hocuri Hocuri commented Aug 19, 2020

This fixes #1804 in two ways: First, it removes a <!doctype html> from
the start of the mail, if there is any.

Then, it parses the html itself it quick-xml fails, just stripping
everything between < and >.

Both of these would have fixed this specific issue, but they are probably both useful for similar issues.

Also, add tests for both fixes.

This fixes #1804 in two ways: First, it removes a <!doctype html> from
the start of the mail, if there is any.

Then, it parses the html itself it quick-xml fails, just stripping
everything between < and >.

Both of these would have fixed this specific issue.

Also, add tests for both fixes.
@Hocuri Hocuri requested review from link2xt and hpk42 August 19, 2020 14:43
@link2xt
Copy link
Collaborator

link2xt commented Aug 19, 2020

Tests fail

@hpk42
Copy link
Contributor

hpk42 commented Aug 19, 2020

would be interesting if remote_tests_rust (merged to master) would now pass.
update: nevermind, it's a real test failure :)

@Hocuri
Copy link
Collaborator Author

Hocuri commented Aug 19, 2020

Yes, all the tests pass now.

@hpk42 hpk42 merged commit 3faf968 into master Aug 19, 2020
@hpk42 hpk42 deleted the fix-wrong-html-parsing branch August 19, 2020 18:03
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

Successfully merging this pull request may close these issues.

HTML-only mail shown as empty, should show something
3 participants