php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46159 DOMDocument::loadHTMLFile() fails with some inputs.
Submitted: 2008-09-23 11:33 UTC Modified: 2008-10-01 01:00 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: alexander dot v at zend dot com Assigned:
Status: No Feedback Package: DOM XML related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
 [2008-09-23 11:33 UTC] alexander dot v at zend dot com
Description:
------------
DOMDocument::loadHTMLFile() generates warnings with some input files.

E.g.
----------------------------------
Warning: DOMDocument::loadHTMLFile(): Input is not proper UTF-8, indicate encoding ! in /home/cawa/...../zend.db.select.html, line: 232 in /home/cawa/..../test.php on line 4
----------

File is actualy correct and is loaded correctly by the following code:
------------------
$htmlData = file_get_contents($fname);
DOMDocument::loadHTML($htmlData);
----------


Reproduce code:
---------------
DOMDocument::loadHTMLFile($fname);


Expected result:
----------------
File is loaded without warning message.

Actual result:
--------------
File is loaded with warning message.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-23 11:54 UTC] alexander dot v at zend dot com
HTML example can be taken here:

documentation/manual/core/ru/zend.db.select.html file of ZF 1.6.1 package (http://framework.zend.com/releases/ZendFramework-1.6.1/ZendFramework-1.6.1.tar.gz)
 [2008-09-23 12:01 UTC] johannes@php.net
There's no such file in that tarball, please provide the file.
 [2008-10-01 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 01:01:27 2024 UTC