GithubHelp home page GithubHelp logo

Comments (12)

Fantella1978 avatar Fantella1978 commented on June 6, 2024 1

Well, then we close the issue.

from htmlmin.

issue-label-bot avatar issue-label-bot commented on June 6, 2024

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

from htmlmin.

voku avatar voku commented on June 6, 2024

ref: voku/simple_html_dom#50

from htmlmin.

voku avatar voku commented on June 6, 2024

Fixed in version 4.4.6

Thanks for the bug report. 👍

from htmlmin.

Fantella1978 avatar Fantella1978 commented on June 6, 2024

Sorry, but not fixed yet.

from htmlmin.

voku avatar voku commented on June 6, 2024

My test with invalid html passed? 🤔 Can you give me a small example of the problem, so that I can use it as test-case? Thanks.

from htmlmin.

Fantella1978 avatar Fantella1978 commented on June 6, 2024

that's the problem is that the example should be a big :)

Try minify this html:

view-source:https://sector.biz.ua/docs/tiworker_exe_bitcoin_miner_riched32_dll/page-no-htmlmin.phtml

Maybe it will help, but cropped on after the 248th tag <wbr>. It seems to me that somewhere there is some kind of boundary in 256, maybe.

from htmlmin.

voku avatar voku commented on June 6, 2024

The error was that php DOMDocument tries to close the <wbr> tags with </wbr> ... so now we will re-write the self-closing tags to e.g. <wbr/>.

Please try version 4.4.7

from htmlmin.

Fantella1978 avatar Fantella1978 commented on June 6, 2024

Tested the version 4.4.7

HtmlMin dont't cut html code :) It's good! BUT, in minified html disappeared tags: <head>, </head>, </body>, </html>.
It's no good!

input:
<!-- === BEGIN TOP === -->
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html prefix="og: http://ogp.me/ns#" lang="ru">
<!--<![endif]-->
<head>
<!-- Title -->
<title>......

output:
<html><body> <!--[if IE 8]> <html lang="en" class="ie8"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9"> <![endif]--> <!--[if !IE]><!--> <!--<![endif]--> <title>.......

As a result, there are errors in checking html: https://validator.w3.org/nu/?doc=https%3A%2F%2Fsector.biz.ua%2Fdocs%2Ftiworker_exe_bitcoin_miner_riched32_dll%2Fpage-with-htmlmin.phtml

from htmlmin.

voku avatar voku commented on June 6, 2024

👍

The problem was that DOMDocument from php cannot handle the input if there are content before the doctype, so we now remove it and it's working as expected. Fixed in version 4.4.8.

from htmlmin.

Fantella1978 avatar Fantella1978 commented on June 6, 2024

Tested version 4.4.8.

Disappeared tags: </head>, </body>, </html>. Validator as a result of verification does not find errors.

from htmlmin.

voku avatar voku commented on June 6, 2024

HtmlMin will remove not needed end-tags: https://html.spec.whatwg.org/multipage/syntax.html#syntax-tag-omission

from htmlmin.

Related Issues (20)

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.