htmlpurifier icon indicating copy to clipboard operation
htmlpurifier copied to clipboard

Content will be cut with multiple body tags

Open stefan377 opened this issue 3 years ago • 1 comments

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.

stefan377 avatar Jan 23 '23 14:01 stefan377

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

ezyang avatar Jan 23 '23 20:01 ezyang