Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use minify_html instead of htmlmin #195

Draft
wants to merge 1 commit into
base: release_4.1.1
Choose a base branch
from

Conversation

danzou56
Copy link

@danzou56 danzou56 commented Feb 26, 2025

Bug

#186

Behavex cannot be installed with python 3.13 because behavex depends on the remove cgi module via htmlmin to perform HTML minification.

Proposed solution

While the change to remove cgi from htmlmin is small, htmlmin hasn't been updated since Python 3.2/8 years ago, so it may not be reasonable to expect the maintainer to merge the pull request. Instead of relying on htmlmin, replace it with minify-html.

Behavex currently passes in pre and textarea as tags to exclude from minification. Likewise, minify-html does not remove whitespace in pre and textarea out of the box

  • Docs make a specific call out to not altering whitespace in <pre> elements
  • Tests show that whitespace is unaffected for pre and textarea elements (HTML entity 32 is a space character)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant