Giter Club home page Giter Club logo

html-pretty-min's People

Contributors

peter279k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

html-pretty-min's Issues

DOMDocument::loadHTML(): Tag article invalid in Entity

Encountering unexpected error while parsing HTML5 tags:

DOMDocument::loadHTML(): Tag article invalid in Entity, line: 7
D:\...\Pasap\vendor\wa72\html-pretty-min\PrettyMin.php:76

Here is the code I'm trying to minify, https://validator.w3.org says it's valid:

<!DOCTYPE html><html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <title>Document</title>
    </head>
    <body>
        <article class="News"> <!-- It blocks here -->
    <h1 class="title">We are Amazing</h1>
    <div class="about">
        <em>
            By Me,
            At 12-12-12     </em>
    </div>
    <div class="content">


                <p>
                    Lorem ipsum dolor sit amet, consectetur adipisicing elit.
                    Atque, consequatur cum iste laudantium libero magni maxime
                    minima mollitia quos. At earum nostrum pariatur. Amet, at
                    fugiat incidunt officia possimus vel?
                </p>
                </div>
</article>

    </body>
</html>

It seems to be a known problem: http://stackoverflow.com/questions/6090667/php-domdocument-errors-warnings-on-html5-tags

Rewrites Thai characters into gibberish

If any text node includes Thai characters, the script ends up rewriting them into HTML-escaped characters, but not the right ones.

Input:

<p>โหลด-เกม</p>

Output:

<p>&agrave;&sup1;&#130;&agrave;&cedil;&laquo;&agrave;&cedil;&yen;&agrave;&cedil;&#148; &agrave;&sup1;&#128;&agrave;&cedil;&#129;&agrave;&cedil;&iexcl;</p>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.