Skip to content

build(deps-dev): bump html-minifier from 4.0.0 to 5.0.3 - #1646

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/html-minifier-5.0.3
Closed

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/html-minifier-5.0.3

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Bumps html-minifier from 4.0.0 to 5.0.3.

Changelog

Sourced from html-minifier's changelog.

[5.0.3] - 2026-11-10

Fixed

  • Fixed mergeScripts joining scripts with only a newline after a last line holding // (as in a URL), which made the next script a call where it starts with ( or [ (e.g., a="https://b" before (c)())
  • Fixed collapseWhitespace removing spaces that render:
    • after an inline element holding only an image, SVG, or other replaced content (e.g., <a><img></a> text)
    • within bdi, bdo, cite, code, dfn, label, q, and ruby elements next to text (e.g., a<code> b</code>)
    • after self-closed svg and math elements, after a no-break space, around end tags that get dropped, and before removed comments next to text
  • Fixed scripts holding <!-- <script>…</script> -->, which browsers end only at a later </script>: The real end tag was dropped, which made the rest of the document script text
  • Fixed removeEmptyElements with removeOptionalTags mishandling what surrounds removed elements:
    • deleting the element before an empty body (e.g., a script or title)
    • leaving a tag omitted because of an element that then got removed (e.g., <a><p>b</p><footer></footer></a> lost </p>, and without a body start tag before a removed element, a following script moved to the head)
  • Fixed removeEmptyElements removing an element that closes another one with no end tag, which moved what follows into that other element (e.g., <p>a<div></div>b became <p>ab)
  • Fixed removeEmptyElements removing empty html, head, and body elements with attributes, which browsers don’t recreate (e.g., <body class="a"></body>), and frameset elements, without which browsers render what follows
  • Fixed removeRedundantAttributes, removeDefaultTypeAttributes, and removeEmptyAttributes removing attributes that a style element in the document selects on (e.g., type given input[type=text])
  • Fixed removeRedundantAttributes removing name from a elements with a different id, which broke links to the name
  • Fixed collapseWhitespace removing a trailing newline from textarea elements, which is part of their value
  • Fixed comments not ending at --!>, and <!--> and <!---> not being read as empty comments—with removeComments, content up to the next --> was deleted
  • Fixed end tags browsers read differently from the parser, which moved or merged content:
    • </tr> and </tbody> closing rows and sections that only have implied start tags were dropped, merging table rows
    • tr and section start tags didn’t close an implied cell, which removeEmptyElements saw as emptying the row
    • End tags of table parts reached outside their own table
    • End tags of formatting elements closed block elements inside them (e.g., <a><div></a>x</div>), and weren’t ignored from within a table when the element is outside it
    • End tags of ordinary elements weren’t ignored with a block element open inside them (e.g., <span><div></span>x</div>)
    • End tags weren’t ignored with an element open inside that ends their scope, such as a table or, for li, a list (e.g., <li><ul></li></ul>x lost </ul>)
  • Fixed whitespace handling and removeEmptyElements losing track of what is open after the end tag of a formatting element with a block element open inside it (e.g., <pre><b><p></b>a</p></pre> kept whitespace after it, and <b><p></b></p>x lost </b>)
  • Fixed whitespace being collapsed within doctype identifiers, which changed them and could change the document mode (e.g., PUBLIC "a b")
  • Fixed doctypes that browsers ignore after a tag or another doctype staying in the output, where removeOptionalTags could leave one first and have it set the document mode (e.g., <body></body><!doctype html>)
  • Fixed removeOptionalTags omitting the body start tag before base, basefont, bgsound, noframes, and title elements, which moved them to the head
  • Fixed minifyCSS emptying invalid media queries, which made the style sheet apply (e.g., media="only screen and 8px)")
  • Fixed quotes running into an attribute name being dropped with the value before them, which turned <a href="x""target="_blank"> into a real target attribute—such a tag is now a parse error, and with continueOnParseError keeps its "target attribute
  • Fixed continueOnParseError turning tags with quotes in attribute names into text (e.g., <img alt="a "b" c">, with decodeEntities, became &lt;img…)
  • Fixed CDATA sections directly in svg and math elements being read as comments, svg elements in annotation-xml being read as MathML, and isindex being read as a void element

Added

  • Added a development-only check that minified output means the same to browsers as its source: npm test compares parse5 trees and rendered whitespace across option combinations, generated markup, and html5lib’s parser tests, and npm run test:equivalence does so for the real-world corpus

Changed

  • Made CLI directory runs (--input-dir, --zero) skip and report a file that fails rather than stop at it; a run with failures ends by listing the files and exits with code 1

[5.0.2] - 2026-11-09

Fixed

  • Fixed minifyCSS and minifyJS deleting or breaking custom fragments that start a rule or statement, follow a case clause or label, or sit in an @charset, @import, or @namespace statement that would be dropped with them—CSS and JavaScript with such a fragment are now kept as written:
    • <style>b { top: 0 }\n<?php echo 1; ?></style> lost the PHP block
    • <style>a { top: 0 }\n<?php echo 1; ?>\nb { top: 0 }</style> had its rules merged across the fragment

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for html-minifier since your current version.

Install script changes

This version adds prepare script that runs during installation. Review the package contents before updating.


@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dist/html-dom-parser.min.js 2.18 KB (0%) 44 ms (0%) 68 ms (+94.85% 🔺) 112 ms

Bumps [html-minifier](https://github.com/j9t/html-minifier) from 4.0.0 to 5.0.3.
- [Changelog](https://github.com/j9t/html-minifier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/j9t/html-minifier/commits)

---
updated-dependencies:
- dependency-name: html-minifier
  dependency-version: 5.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/html-minifier-5.0.3 branch from 0c55d29 to 9a72e99 Compare November 13, 2026 10:17
@dependabot @github

dependabot Bot commented on behalf of github Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1649.

@dependabot dependabot Bot closed this Nov 16, 2026
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/html-minifier-5.0.3 branch November 16, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants