htmlmin
htmlmin copied to clipboard
A configurable HTML Minifier with safety features
Hello, The middleware [looks for a header `Content-Type`](https://github.com/mankyd/htmlmin/blob/220b1d16442eb4b6fafed338ee3b61f698a01e63/htmlmin/middleware.py#L80) whose value is _exactly_ `text/html`. However Flask’s default is `text/html; charset=utf-8`. Using this middleware as-is in a Flask app thus doesn’t work.
Consider ```` Hello World Some text with an url Some text with another url ```` `htmlmin index.html` generates ```` Hello World Some text with an url Some text with another...
tried to run it with `htmlmin -p img link --keep-optional-attribute-quotes file.xhtml file_minified.xhtml` but I get error because still `` gets converted to `` and `` to ``
Re-escape characters in data to minimise code further. In data sections only ampersand and less-than sign need to be escaped. Since characters are always shorter than their entities not escaping...
Fixes a few typos found in documentation Signed-off-by: Chris Ring
Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated...
Wheels are the modern standard of Python distribution Advantages of wheels: - Faster installation - Avoids arbitrary code execution for installation by avoiding setup.py - Allows better caching for testing...
The contains 'from __future__ import unicode_literals' so the u-prefix can be removed.