HTMLdoc v1.3.0
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 usinghtmldoc::__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()
andhtmldoc::append()
to add nodes to a document, this is implemented in thetag
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 totag::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, updatedhtmldoc::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 instring
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