php-html-parser icon indicating copy to clipboard operation
php-html-parser copied to clipboard

An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.

Results 75 php-html-parser issues
Sort by recently updated
recently updated
newest added

[Dom::loadFromUrl](https://github.com/paquettg/php-html-parser/blob/4e01a438ad5961cc2d7427eb9798d213c8a12629/src/PHPHtmlParser/Dom.php#L129) uses [GuzzleHttp\Client::sendRequest](https://github.com/guzzle/guzzle/blob/7.8/src/Client.php#L132) which disables "allow-redirects" before making call. Either change to user [GuzzleHttp\Client::send](https://github.com/guzzle/guzzle/blob/7.8/src/Client.php#L120) or add option to specify if request should follow redirects and send option in request.

There is an incompatibility with PHP 8.1. Temporary fix is to add attribute: ``` #[\ReturnTypeWillChange] at line 140 in Dom/Collection.php ```

Added return type to offsetGet method in PHPHtmlParser/Dom/Node/Collection class in order to fix deprecation notice caused by return type mismatch between the class and ArrayAccess interface

``` PHP Warning 'yii\base\ErrorException' with message 'preg_match_all(): Compilation failed: invalid range in character class at offset 4' in vendor/paquettg/php-html-parser/src/PHPHtmlParser/Selector.php:91 ``` Code was this: ``` $file = file_get_contents($this->file_path); $dom = new...

`$dom->find(…)` does not work with a CSS selector with multiple attributes. Example: ```php $testDom = new Dom(); $testDom->loadStr(''); $allCheckboxes = $testDom->find('input[name="color"]'); echo count($allCheckboxes); // 2 → that is fine $blueCheckbox...

Suppose I have a URI "/search?v1#page1". I need to get a next page "/search?v1#page2". But cause of the link formed by js and the '#page2' looks like a command for...

For what's being used in this library, nothing changes between v1 and v2 of guzzlehttp/psr7 so we don't need to prevent this library from being used with the latter.

Fix parsing html with tag that has 'tag' attribute. Now it you will try to parse html like `` it fails.

Deprecated: Return type of PHPHtmlParser\Dom\Node\Collection::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/sage/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/Node/Collection.php on line 133