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

Remove BOM not only on start of the content #4777

Closed
rcubetrac opened this issue Feb 27, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@rcubetrac
Copy link

commented Feb 27, 2015

Reported by @alecpl on 27 Feb 2015 07:50 UTC as Trac ticket #1490291

A newsletter sent from coindesk.com contains invalid HTML content (quoted-printable):

<!DOCTYPE html PUBLIC "-_W3C_DTD XHTML 1.0 Transitional_EN" "http:_www=
=2Ew3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
=EF=BB=BF<html...

As you see it put BOM sequence not as the first characters. Roundcube will not remove it. This causes DOMDocument parser in rcube_washtml class to fail. The message will be empty.

I propose to remove BOM sequences not only on start of the body but also in the whole body.

Migrated-From: http://trac.roundcube.net/ticket/1490291

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 27, 2015

Comment by @alecpl on 27 Feb 2015 08:14 UTC

It's safer to remove <!DOCTYPE> first. Fixed in 759566f.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 27, 2015

Status changed by @alecpl on 27 Feb 2015 08:14 UTC

new => closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.