Skip to content

v.2.7.0 loading html with ALLOW_DUPLICATE_IDS returns empty document #63

@MocioF

Description

@MocioF

In a project of mine, I am using version 2.7.0.
After loading a html page with ALLOW_DUPLICATE_IDS
with something like
$this->domdocument->loadHTML( $htmlsource, HTML5DOMDocument::ALLOW_DUPLICATE_IDS );
it seems that the parser always returns an empty page.
The output of $this->domdocument->saveHTML() is somthing similar to:

<!DOCTYPE html>
<!--?xml encoding="utf-8" ?--><html lang="it-IT">
<head></head></html>

or

<!DOCTYPE html>
<!--?xml encoding="utf-8" ?--><html lang="en-US">
	<head></head></html>

or

<!DOCTYPE html>
<!--?xml encoding="utf-8" ?--><html class="no-js alert__has-cookie" lang="en-US">
<head></head></html>

EDIT: The problem show in a machine with libxml2-2.14.6 installed and I think the issue is related to libxml2 version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions