ezyang / ezyang/htmlpurifier

Content will be cut with multiple body tags

Open
#362 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.4k
Forks
361
Avg merge
3d 41m
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied HTML input with two html/body pairs and inspect how the purifier handles the second body element. Done means the content after the second body tag is no longer cut off while the input remains safely purified.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.