ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.02k stars 323 forks source link

Content will be cut with multiple body tags #362

Open stefan377 opened 1 year ago

stefan377 commented 1 year ago

The following string will result in "cars", the word "houses" will be cut off.

<html><body>cars</body></html> <html><body>houses</body></html>

I know it's not valid html, but saw this today in a email. The html body of the email contained multiple html and body tags. So most of the email body was cut off by the purifier.

ezyang commented 1 year ago

an easy hotfix is to regex so that html/body tags are removed