Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return wrong html #25

Open
kartofelek007 opened this issue Dec 5, 2021 · 1 comment
Open

Return wrong html #25

kartofelek007 opened this issue Dec 5, 2021 · 1 comment

Comments

@kartofelek007
Copy link

kartofelek007 commented Dec 5, 2021

I have html with script inline:

<script>
{
    const btn = document.querySelector("#test3");
    btn.addEventListener("click", e => {
        document.querySelector("#test3div").innerHTML = `
            <div class="module">
                <h2>lorem ipsum</h2>
                <p>lorem <strong>lorem </strong></p>
                <button class="button">klik</button>
            </div>
        `;
    });
}
</script>

I use your class:

function generateContentTable($content) {
 $dom = new DomQuery($content);
return $dom->find('html')->html();
}

where $content is all html. This generate wrong html:

<script>
{
    const btn = document.querySelector("#test3");
    btn.addEventListener("click", e => {
        document.querySelector("#test3div").innerHTML = `
            <div class="module">
                <h2>lorem ipsum
                <p>lorem <strong>lorem </strong>
                <button class="button">klik
            </script>
</div>
        `;
    });
}
@kartofelek007
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant