html-minifier
html-minifier copied to clipboard
[Bug] Indentations aren't minified.
With the defaults enabled, the undermentioned: ^1
<iframe
id="meta-iframe"
sandbox="allow-same-origin"
style="border:none;width:100%;height:1px;overflow:hidden;"
srcdoc='
<style>
.meta-wrapper {
padding: 1em;
background: #fffde7;
}
.meta-table {
width: 100%;
color: black !important;
margin-bottom: 1em;
font-family: monospace;
font-size: 16px;
border-collapse: collapse;
}
.meta-table th, .meta-table td {
padding: 4px 12px;
color: black !important;
text-align: left;
min-width: 100px;
}
.meta-table th {
width: 100px;
}
</style>
<div class="meta-wrapper">
<table class="meta-table">
<tr>
<th scope="row">From:</th><td><span class="mp_address_group"><span class="mp_address_name">do-not-reply-to-this-address at whatdotheyknow.com</span> &lt;<a href="mailto:[email protected]" class="mp_address_email">[email protected]</a>&gt;</span></td>
</tr>
<tr>
<th scope="row">To:</th><td><span class="mp_address_group"><span class="mp_address_name">Mr. Beedell, Roke Julian Lockhart (RJLB)</span> &lt;<a href="mailto:[email protected]" class="mp_address_email">[email protected]</a>&gt;</span></td>
</tr>
<tr>
<th scope="row">Subject:</th><td>Your WhatDoTheyKnow email alert</td>
</tr>
<tr>
<th scope="row">Date:</th><td>Wed Oct 29 2025 12:21:33 GMT+0000 (Coordinated Universal Time)</td>
</tr>
</table>
</div>
'
onload="this.style.height=(this.contentWindow.document.body.scrollHeight)+'px';">
</iframe>
<html><head><title>Your WhatDoTheyKnow email alert</title><meta charset="utf-8">
<style>
body { font-size: 16px; word-break: break-word; white-space: pre-wrap; }
</style>
</head><body><p>FOI requests by 'Michal Poreba'<br/>===============================</p><p>-- Request for source code that once was public --<br/>Department for Business and Trade sent a response to Michal Poreba (23 September 2025)<br/>"Please find attached our response to your request for an internal review into the handling of (Our ref IR2025/09847). Kind regards, Information Ri..."<br/><a href="https://www.whatdotheyknow.com/request/request_for_source_code_that_onc?nocache=incoming-3164069#incoming-3164069">https://www.whatdotheyknow.com/request/request_for_source_code_that_onc?nocache=incoming-3164069#incoming-3164069</a></p><p>New updates for the request 'Request for source code that once was public'<br/>==========================================================================</p><p>Department for Business and Trade sent a response to Michal Poreba (23 September 2025)<br/>"Please find attached our response to your request for an internal review into the handling of (Our ref IR2025/09847). Kind regards, Information Ri..."<br/><a href="https://www.whatdotheyknow.com/request/request_for_source_code_that_onc?nocache=incoming-3164069#incoming-3164069">https://www.whatdotheyknow.com/request/request_for_source_code_that_onc?nocache=incoming-3164069#incoming-3164069</a></p><p>-- the WhatDoTheyKnow team</p><p>Alter your subscription<br/>=======================</p><p><a href="https://www.whatdotheyknow.com/profile/sign_in?r=%2Fuser%2Fmr_beedell_roke_julian_lockhart_%23email_subscriptions">https://www.whatdotheyknow.com/profile/sign_in?r=%2Fuser%2Fmr_beedell_roke_julian_lockhart_%23email_subscriptions</a></p><p>Unsubscribe<br/>===========</p><p><a href="https://www.whatdotheyknow.com/users/email_alerts/disable/MjY4MzMw--94fb36bcca71cf51b3598cec5bd4fe42e071f63a">https://www.whatdotheyknow.com/users/email_alerts/disable/MjY4MzMw--94fb36bcca71cf51b3598cec5bd4fe42e071f63a</a></p><p>--------------------------------------------------------------------------------</p><p>WhatDoTheyKnow is a project of mySociety run by a small team of staff and<br/>dedicated volunteers.</p><p>mySociety is a charity that believes that information should be accessible to everyone.<br/>If this is important to you, please consider donating to help us do more:<br/><a href="https://www.whatdotheyknow.com/donate">https://www.whatdotheyknow.com/donate</a></p><p>Find out more about how we handle your data at:<br/><a href="https://www.whatdotheyknow.com/help/privacy">https://www.whatdotheyknow.com/help/privacy</a></p><p>mySociety is a registered charity in England and Wales (1076346), and a limited<br/>company (03277032)</p><p> <!--banner-info--><br/>This email was sent to <a href="mailto:[email protected]">[email protected]</a> (<a href="https://www.whatdotheyknow.com/profile/change_email">https://www.whatdotheyknow.com/profile/change_email</a>) from <a href="mailto:[email protected]">[email protected]</a>.<br/>To deactivate this alias copy and paste the url below into your web browser.</p><p><a href="https://app.addy.io/deactivate/dcddccf8-c2ee-4335-8d49-cb7519e2aee5?signature=049ed52a069c7ab5b343656bee73a6a40297808161db2bc4e5dc2923dfe102d4">https://app.addy.io/deactivate/dcddccf8-c2ee-4335-8d49-cb7519e2aee5?signature=049ed52a069c7ab5b343656bee73a6a40297808161db2bc4e5dc2923dfe102d4</a><br/><!--banner-info--></p></body></html>
...became:
<iframe id=meta-iframe onload='this.style.height=this.contentWindow.document.body.scrollHeight+"px"'sandbox=allow-same-origin srcdoc='
<style>
.meta-wrapper {
padding: 1em;
background: #fffde7;
}
.meta-table {
width: 100%;
color: black !important;
margin-bottom: 1em;
font-family: monospace;
font-size: 16px;
border-collapse: collapse;
}
.meta-table th, .meta-table td {
padding: 4px 12px;
color: black !important;
text-align: left;
min-width: 100px;
}
.meta-table th {
width: 100px;
}
</style>
<div class="meta-wrapper">
<table class="meta-table">
<tr>
<th scope="row">From:</th><td><span class="mp_address_group"><span class="mp_address_name">do-not-reply-to-this-address at whatdotheyknow.com</span> &lt;<a href="mailto:[email protected]" class="mp_address_email">[email protected]</a>&gt;</span></td>
</tr>
<tr>
<th scope="row">To:</th><td><span class="mp_address_group"><span class="mp_address_name">Mr. Beedell, Roke Julian Lockhart (RJLB)</span> &lt;<a href="mailto:[email protected]" class="mp_address_email">[email protected]</a>&gt;</span></td>
</tr>
<tr>
<th scope="row">Subject:</th><td>Your WhatDoTheyKnow email alert</td>
</tr>
<tr>
<th scope="row">Date:</th><td>Wed Oct 29 2025 12:21:33 GMT+0000 (Coordinated Universal Time)</td>
</tr>
</table>
</div>
'style=border:none;width:100%;height:1px;overflow:hidden></iframe><title>Your WhatDoTheyKnow email alert</title><meta charset=utf-8><style>body{font-size:16px;word-break:break-word;white-space:pre-wrap}</style><p>FOI requests by 'Michal Poreba'<br>===============================<p>-- Request for source code that once was public --<br>Department for Business and Trade sent a response to Michal Poreba (23 September 2025)<br>"Please find attached our response to your request for an internal review into the handling of (Our ref IR2025/09847). Kind regards, Information Ri..."<br><a href="https://www.whatdotheyknow.com/request/request_for_source_code_that_onc?nocache=incoming-3164069#incoming-3164069">https://www.whatdotheyknow.com/request/request_for_source_code_that_onc?nocache=incoming-3164069#incoming-3164069</a><p>New updates for the request 'Request for source code that once was public'<br>==========================================================================<p>Department for Business and Trade sent a response to Michal Poreba (23 September 2025)<br>"Please find attached our response to your request for an internal review into the handling of (Our ref IR2025/09847). Kind regards, Information Ri..."<br><a href="https://www.whatdotheyknow.com/request/request_for_source_code_that_onc?nocache=incoming-3164069#incoming-3164069">https://www.whatdotheyknow.com/request/request_for_source_code_that_onc?nocache=incoming-3164069#incoming-3164069</a><p>-- the WhatDoTheyKnow team<p>Alter your subscription<br>=======================<p><a href="https://www.whatdotheyknow.com/profile/sign_in?r=%2Fuser%2Fmr_beedell_roke_julian_lockhart_%23email_subscriptions">https://www.whatdotheyknow.com/profile/sign_in?r=%2Fuser%2Fmr_beedell_roke_julian_lockhart_%23email_subscriptions</a><p>Unsubscribe<br>===========<p><a href=https://www.whatdotheyknow.com/users/email_alerts/disable/MjY4MzMw--94fb36bcca71cf51b3598cec5bd4fe42e071f63a>https://www.whatdotheyknow.com/users/email_alerts/disable/MjY4MzMw--94fb36bcca71cf51b3598cec5bd4fe42e071f63a</a><p>--------------------------------------------------------------------------------<p>WhatDoTheyKnow is a project of mySociety run by a small team of staff and<br>dedicated volunteers.<p>mySociety is a charity that believes that information should be accessible to everyone.<br>If this is important to you, please consider donating to help us do more:<br><a href=https://www.whatdotheyknow.com/donate>https://www.whatdotheyknow.com/donate</a><p>Find out more about how we handle your data at:<br><a href=https://www.whatdotheyknow.com/help/privacy>https://www.whatdotheyknow.com/help/privacy</a><p>mySociety is a registered charity in England and Wales (1076346), and a limited<br>company (03277032)<p><!--banner-info--><br>This email was sent to <a href=mailto:[email protected]>[email protected]</a> (<a href=https://www.whatdotheyknow.com/profile/change_email>https://www.whatdotheyknow.com/profile/change_email</a>) from <a href=mailto:[email protected]>[email protected]</a>.<br>To deactivate this alias copy and paste the url below into your web browser.<p><a href="https://app.addy.io/deactivate/dcddccf8-c2ee-4335-8d49-cb7519e2aee5?signature=049ed52a069c7ab5b343656bee73a6a40297808161db2bc4e5dc2923dfe102d4">https://app.addy.io/deactivate/dcddccf8-c2ee-4335-8d49-cb7519e2aee5?signature=049ed52a069c7ab5b343656bee73a6a40297808161db2bc4e5dc2923dfe102d4</a><br><!--banner-info-->
Can reproduce on https://kangax.github.io/html-minifier/. Cross-tested on https://j9t.github.io/html-minifier-next/ where it seems to work.
Did you test there on that page, is it the defaults there that you’re referring to? (The defaults are otherwise all off.)
Then, HTML Minifier isn’t maintained anymore. You could try html-minifier-next, which is a maintained and 99.99% compatible fork.
@j9t, thanks. That works. I've filed issues/1167 to attempt to prevent others discovering this deprecated version, and have created pull/1168 to remediate it.