|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77040 tidyNode::isHtml() is completely broken
Submitted: 2018-10-19 22:57 UTC Modified: 2020-10-07 10:56 UTC
From: Assigned: cmb (profile)
Status: Closed Package: Tidy (PECL)
PHP Version: master-Git-2018-10-19 (Git) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2018-10-19 22:57 UTC]
From looking at the implementation[1], tidyNode::isHtml() is
presumably supposed to check whether the node is a start, end or
empty tag.  However, it uses members of the TidyNodeType enum[2]
as if these were bitfields, which they are not.  Therefore it
matches all node types except TidyNode_CDATA.

The documentation states[3]:

| Checks if a node is part of a HTML document

This does neither match the implementation, nor what the method
presumably is supposed to do.

[1] <>
[2] <>
[3] <>


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-07 10:56 UTC]
-Assigned To: +Assigned To: cmb
 [2020-10-07 10:56 UTC]
The following pull request has been associated:

Patch Name: Fix #77040: tidyNode::isHtml() is completely broken
On GitHub:
 [2020-10-07 15:51 UTC]
Automatic comment on behalf of
Log: Fix #77040: tidyNode::isHtml() is completely broken
 [2020-10-07 15:51 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun May 29 09:05:45 2022 UTC