|  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: -
From: Assigned:
Status: Open Package: Tidy (PECL)
PHP Version: master-Git-2018-10-19 (Git) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
47 - 19 = ?
Subscribe to this entry?

 [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

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Sep 22 14:01:23 2020 UTC