voku / HtmlMin

:clamp: HtmlMin: HTML Compressor and Minifier via PHP
MIT License
161 stars 22 forks source link

Unnecessary line breaks are inserted in img tag "sizes" and "srcset" attribute values #31

Closed roadster31 closed 5 years ago

roadster31 commented 5 years ago

What is this feature about (expected vs actual behaviour)?

Expected behaviour is a single line of HTML

Actual beaviour is :

<img alt="PAIRE DE SILENCIEUX  TYPE MEGATON Lg 440 mm" class="img-responsive" height="170" itemprop="image" sizes="(max-width: 768x) 354px,
                            (max-width: 992px) 305px,
                            212px" src="https://cdn.gmp-classic.com/cache/images/product/93c869f20df68d3e531f7e9c3e603e5e-p1000223_3800.jpg" srcset="https://cdn.gmp-classic.com/cache/images/product/5ee4535311159aaf1c4ae44fbebd83c2-p1000223_3800.jpg 768w,
                     https://cdn.gmp-classic.com/cache/images/product/82e8bafbecab56f932720490e7fc2f85-p1000223_3800.jpg 992w,
                     https://cdn.gmp-classic.com/cache/images/product/93c869f20df68d3e531f7e9c3e603e5e-p1000223_3800.jpg 1200w" width="212"></a><div class="col-sm-6 product-info">

How can I reproduce it?

Try to minify this code :

<img alt="PAIRE DE SILENCIEUX  TYPE MEGATON Lg 440 mm" class="img-responsive" height="170" itemprop="image" sizes="(max-width: 768x) 354px, (max-width: 992px) 305px, 212px" src="https://cdn.gmp-classic.com/cache/images/product/93c869f20df68d3e531f7e9c3e603e5e-p1000223_3800.jpg" srcset="https://cdn.gmp-classic.com/cache/images/product/5ee4535311159aaf1c4ae44fbebd83c2-p1000223_3800.jpg 768w, https://cdn.gmp-classic.com/cache/images/product/82e8bafbecab56f932720490e7fc2f85-p1000223_3800.jpg 992w,https://cdn.gmp-classic.com/cache/images/product/93c869f20df68d3e531f7e9c3e603e5e-p1000223_3800.jpg 1200w" width="212"></a><div class="col-sm-6 product-info">

Does it take minutes, hours or days to fix?

Not sure.

Any additional information?

Thanks !

roadster31 commented 5 years ago

Wrong issue, please ignore.