Skip to content

Releases: hexydec/htmldoc

HTMLdoc v1.6.0

02 Mar 23:18
Compare
Choose a tag to compare

This release adds a new feature and fixes some compatibility issues:

  • Attribute selectors can now be specified as non case sensitive
  • Added tests
  • Fixed compatibility issue withPHP 8.1
  • Updated dependencies

HTMLdoc v1.5.0

03 Dec 22:42
Compare
Choose a tag to compare

This release adds some new document anipulation methods, and fixes a bug:

  • Added htmldoc::before() and htmldoc::after()
  • Added tests
  • Fixed issue where if you removed nodes with tag::remove(), it caused issues in text::minify() because it expects the keys to be sequential. It now re-keys the children after the node has been removed
  • Updated dependencies to fix issue with undefined in JSLite

HTMLdoc v1.4.0

04 Oct 21:54
Compare
Choose a tag to compare

This release updates the configuration and adds a safe option to enable to software to be safer out of the box:

  • Fixed bug in tag::minify() where the closing <html> tag was not removed when close is set to true
  • Updated minification settings in config.php to make IE comments removed by default now that IE11 is dead
  • Added a safe settings option that disables options that can be unsafe
  • Updated tests.
  • Updated dependencies

HTMLdoc v1.3.1

10 Sep 23:03
Compare
Choose a tag to compare

This is a bug fix release:

  • Updated dependencies to fix issue with JSLite
  • Fixed bug in tag::minify() where if a URL linked back to the homepage without a trailing /, the URL was incorrectly minified to an empty string, which meant links back to the homepage didn't work

HTMLdoc v1.3.0

24 Aug 21:52
Compare
Choose a tag to compare

This release adds some new features to allow you manipulate documents more, the code is also stricter, and a few bugs have been fixed:

  • Fixed issue where parse_url() was compared to an empty string instead of null
  • Added more attributes to the default list that can be safely removed
  • Removed config::setConfig() in favour of using the property which can be read using htmldoc::__get()
  • Updated htmldoc::parse() to do all the work of converting an HTML string into nodes, which is now returned rather than set. It can also extract nodes from an HTMLdoc object
  • Added htmldoc::prepend() and htmldoc::append() to add nodes to a document, this is implemented in the tag object which clones the nodes and appends/prepends them to each object
  • Added htmldoc::remove() to enable nodes to be deleted
  • Added :not() selector processing to tag::find()
  • Made some comparisons stricter for performance
  • Fixed issue in htmldoc::parse() where the return type was incorrect
  • Fixed issue with tag::$singleton where the property was defined as a bool but was used as and should be a string
  • Removed return type void from tag::__clone() as it must not return a type
  • Fixed issue with variable type in tag::parse()
  • Removed variables that were not being used
  • Fixed incorrect return type in docblock
  • Fixed issue in tag::text() where it returned an array, but it should return a string, updated htmldoc::text() to expect this
  • Updated htmldoc::open() to check the $context variable is a resource
  • Added viewport meta tag to index.php, and updated the options column to be as small as it can
  • Double slashed regexp patterns in htmldoc::$selectors, fixed bug in string where it captured brackets
  • Updated htmldoc::parseSelector() to accept a tokenise object instead of the input selector string
  • Enabled pseudo selectors to capture selectors in brackets in htmldoc::parseSelector()
  • Updated selector tests to be an array to make it easier to see tests, and added more tests to findHtmldocTest::testCanFindElements()
  • Added tests
  • Fixed issue with some tests where some line endings were CRLF and some were LF, they are now all LF
  • Tweaks to index.php
  • Added documentation for new methods
  • Fixed minor issues in documentation

HTMLdoc v1.2.5

13 Jun 14:56
Compare
Choose a tag to compare

This is a bug fix release that fixes some issues and improve validation of the output code:

  • Remove alt from list of attributes that can be removed in config::__construct() as this is not valid HTML
  • Allowed the attribute token to consume any extra following quotes to prevent capturing being offset when the input HTML is incorrect in htmldoc::$tokens
  • Fixed bug in custom::parse() where <script> is allowed to start with an opening HTML comment, a leftover from the days when browsers didn't know what javascript was, but is still legal, it will now be removed by default
  • Fixed bugs in doctype::parse() where there were no tokens to capture anything in quotes, which has now been added to htmldoc::$tokens. It now stores the components in an array, and normalises whitespace
  • Added minifications to doctype::minify to lowercase directives in the doctype and convert quotes
  • The target attribute will now be removed if it is empty
  • Added tests

HTMLdoc v1.2.4

10 Jun 23:00
Compare
Choose a tag to compare

This release fixes some issues, updates dependencies and adds a new feature:

  • Fixed issue in custom::parse() where the regular expression didn't always capture all the code
  • Updated tag::html() to remove quotes from attributes that have a / in it, also used a different function
  • Fixed issues with invalid charsets, updated code to check the charset is valid in htmldoc::getCharsetFromHtml()
  • Updated performance.php to show the compression ratio with more decimal places, also set some server vars to enable the hrefs within the page to be minified
  • Updated dependencies to use the latest versions of CSSdoc, JSlite, and tokenise
  • Updated htmldoc::attr() and tag::attr() to support setting attributes
  • Added tests.

HTMLdoc v1.2.3

23 May 19:51
Compare
Choose a tag to compare

This release updates the handling of custom tags:

  • Unified the objects that handled style and script into a generic custom tag handler class
  • Updated custom handler callback to pass the tag name to the handler class, and to the minification callback enabling a generic callback function, a default which is now configured in config.php
  • Updated jslite to 0.4.1 in composer.json

HTMLdoc v1.2.2

22 May 18:01
Compare
Choose a tag to compare

This is a maintenance release that updates the following:

  • Fixed bug in htmldoc::key() where the wrong return type was specified
  • Fixed issues in documentation
  • Added more tests to findHtmldocTest::testCanTraverseElements() to test traversing as an array
  • Updated composer dependencies, which are now pegged to releases rather than @dev
  • Added tests to show that the CSS and Javascript parser and minifiers work
  • Updated phpunit.xml to remove src/autoload.php from coverage reports

HTMLDoc v1.2.1

13 May 21:18
Compare
Choose a tag to compare

This is a maintenance release that updates the dependencies to fix bugs in upstream projects.

It also fixes a bug in tag::minify() where trailing slashes were removed from URLs when it was smaller to crawl back folders using ../