<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Activity for PHP Simple HTML DOM Parser</title><link>https://sourceforge.net/p/simplehtmldom/activity/</link><description>Recent activity for PHP Simple HTML DOM Parser</description><language>en</language><lastBuildDate>Mon, 02 Dec 2024 02:52:53 -0000</lastBuildDate><item><title>Hi Man O ManaO modified a comment on ticket #63</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/63/?limit=250#afc7</link><description>Ok. Wrong test. The method it's called like $sections = $html-&gt;find('section')-&gt;firstChild(); but I got the same an error because it's an Array. So there's not the same as the CSS pseudo selector rule :first-child How to use it to get the same result as CSS? TNX</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hi Man O ManaO</dc:creator><pubDate>Mon, 02 Dec 2024 02:52:53 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/63/?limit=250#afc7</guid></item><item><title>Hi Man O ManaO modified a comment on ticket #63</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/63/?limit=250#afc7</link><description>Ok. Wrong test. The method it's called like $sections = $html-&gt;find('section')-&gt;firstChild(); but I got the same an error because it's an Array. So there's not the same as the CSS pseudo selector rule :first-child How to use it to get the same result as CSS? TNX</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hi Man O ManaO</dc:creator><pubDate>Mon, 02 Dec 2024 02:51:40 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/63/?limit=250#afc7</guid></item><item><title>Hi Man O ManaO modified a comment on ticket #63</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/63/?limit=250#afc7</link><description>Ok. Wrong test. The method it's called like $sections = $html-&gt;find('section')-&gt;firstChild(); but I got the same an error because it's an Array. So there's not the same as the CSS pseudo selector rule :first-child How to use it to get the same result? TNX</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hi Man O ManaO</dc:creator><pubDate>Mon, 02 Dec 2024 02:51:26 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/63/?limit=250#afc7</guid></item><item><title>Hi Man O ManaO posted a comment on ticket #63</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/63/?limit=250#afc7</link><description>Ok. Wrong test. The method it's called like $sections = $html-&gt;find('section')-&gt;firstChild(); but I got the same an error because it's an Array. So there's not the same as the CSS pseudo selector rule first-child</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hi Man O ManaO</dc:creator><pubDate>Mon, 02 Dec 2024 02:50:52 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/63/?limit=250#afc7</guid></item><item><title>Hi Man O ManaO posted a comment on ticket #210</title><link>https://sourceforge.net/p/simplehtmldom/bugs/210/?limit=250#98cd</link><description>Sorry, wrong goal. Close this. The correct answer it's here: https://sourceforge.net/p/simplehtmldom/support-requests/63/</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hi Man O ManaO</dc:creator><pubDate>Sat, 30 Nov 2024 21:30:48 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/210/?limit=250#98cd</guid></item><item><title>Hi Man O ManaO created ticket #63</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/63/</link><description>Get the elements of the upper level like with CSS pseudo selector :first-child</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hi Man O ManaO</dc:creator><pubDate>Sat, 30 Nov 2024 20:52:01 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/63/</guid></item><item><title>Hi Man O ManaO created ticket #210</title><link>https://sourceforge.net/p/simplehtmldom/bugs/210/</link><description>Find first child element like CSS does not respect order</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hi Man O ManaO</dc:creator><pubDate>Sat, 30 Nov 2024 10:10:25 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/210/</guid></item><item><title>Maxim Volobuev created ticket #209</title><link>https://sourceforge.net/p/simplehtmldom/bugs/209/</link><description>Decoding HTML entities corrupts text in HTML</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Maxim Volobuev</dc:creator><pubDate>Thu, 21 Nov 2024 17:58:00 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/209/</guid></item><item><title>Igor Zhuravlov posted a comment on ticket #208</title><link>https://sourceforge.net/p/simplehtmldom/bugs/208/?limit=25#75e9</link><description>This bug persists even with well-formed HTML with single root element: &lt;?php $s_htm = &lt;&lt;&lt;EOT &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&gt; &lt;body&gt; &lt;div class="c1"&gt;&lt;/div&gt; &lt;div class="c2"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; EOT; ...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor Zhuravlov</dc:creator><pubDate>Tue, 17 Oct 2023 05:09:46 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/208/?limit=25#75e9</guid></item><item><title>Igor Zhuravlov created ticket #208</title><link>https://sourceforge.net/p/simplehtmldom/bugs/208/</link><description>$node-&gt;find() finds element next to $node</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor Zhuravlov</dc:creator><pubDate>Tue, 17 Oct 2023 01:35:04 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/208/</guid></item><item><title>Kowsar Hossain posted a comment on ticket #207</title><link>https://sourceforge.net/p/simplehtmldom/bugs/207/?limit=25#a815</link><description>I've also submitted a patch to address this issue here: https://sourceforge.net/p/simplehtmldom/feature-requests/68/</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kowsar Hossain</dc:creator><pubDate>Tue, 07 Mar 2023 07:20:38 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/207/?limit=25#a815</guid></item><item><title>Kowsar Hossain created ticket #68</title><link>https://sourceforge.net/p/simplehtmldom/feature-requests/68/</link><description>Added feature to enable/disable htmlentity operations</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kowsar Hossain</dc:creator><pubDate>Tue, 07 Mar 2023 07:18:57 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/feature-requests/68/</guid></item><item><title>Kowsar Hossain created ticket #207</title><link>https://sourceforge.net/p/simplehtmldom/bugs/207/</link><description>The output doesn't match the input even when the input hasn't been modified</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kowsar Hossain</dc:creator><pubDate>Tue, 07 Mar 2023 06:55:57 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/207/</guid></item><item><title>DennisKmetz created ticket #62</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/62/</link><description>PHP 8.x support</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">DennisKmetz</dc:creator><pubDate>Thu, 23 Feb 2023 16:05:05 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/62/</guid></item><item><title>olalav created ticket #67</title><link>https://sourceforge.net/p/simplehtmldom/feature-requests/67/</link><description>Get only text in leaf nodes (avoid duplication)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Mon, 06 Feb 2023 09:59:05 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/feature-requests/67/</guid></item><item><title>hkirsman created ticket #61</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/61/</link><description>Is Github page safe to use for downloads?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hkirsman</dc:creator><pubDate>Thu, 19 Jan 2023 19:30:08 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/61/</guid></item><item><title>olalav created ticket #205</title><link>https://sourceforge.net/p/simplehtmldom/bugs/205/</link><description>End tags erroneously included in plaintext</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Wed, 11 Jan 2023 07:44:34 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/205/</guid></item><item><title>Philip posted a comment on a blog post</title><link>https://sourceforge.net/p/simplehtmldom/news/2019/10/composer-package/?limit=25#078c</link><description>There is a typo in the command, missing the "p" in the second "simple." shoulde be composer require simplehtmldom/simplehtmldom dev-master</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Philip</dc:creator><pubDate>Wed, 04 Jan 2023 15:25:35 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/news/2019/10/composer-package/?limit=25#078c</guid></item><item><title>Coz posted a comment on ticket #185</title><link>https://sourceforge.net/p/simplehtmldom/bugs/185/?limit=25#1afd/5929</link><description>This is not a bug in simplehtmldom Yes it is. You're not setting a user agent in either the curl code or the stream_context code. Any properly configured server will reject the requests, which makes the project useless. You need to either add a generic user agent (recommend google bot) or provide a way for the user to pass in their own user agent to the function. See lines 72 and 111 of revised HtmlWeb.php file.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Coz</dc:creator><pubDate>Wed, 21 Dec 2022 02:37:08 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/185/?limit=25#1afd/5929</guid></item><item><title>olalav posted a comment on ticket #203</title><link>https://sourceforge.net/p/simplehtmldom/bugs/203/?limit=25#98fe</link><description>Actually it has to be done something like this, because this function can be called from inside the library, and we want to get the first call that is outside the library. PS! Is the maintainer active these days? Has been quiet for a while. diff --git a/HtmlNode.php b/HtmlNode.php index 9649d37..99dbda4 100644 --- a/HtmlNode.php +++ b/HtmlNode.php @@ -549,3 +554,12 @@ class HtmlNode { - return $this-&gt;find($selector, $idx, $lowercase) ?: null; + if(!$element = $this-&gt;find($selector, $idx, $lowercase))...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Fri, 09 Dec 2022 10:13:39 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/203/?limit=25#98fe</guid></item><item><title>olalav posted a comment on ticket #204</title><link>https://sourceforge.net/p/simplehtmldom/bugs/204/?limit=25#e9c8</link><description>diff --git a/HtmlNode.php b/HtmlNode.php index 9649d37..aef8b17 100644 --- a/HtmlNode.php +++ b/HtmlNode.php @@ -549,3 +549,12 @@ class HtmlNode + function first($selector, $idx = 0, $lowercase = false) + { + return $this-&gt;expect($selector, $idx, $lowercase); + } Missed semicolon and preformatting.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Wed, 07 Dec 2022 09:04:40 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/204/?limit=25#e9c8</guid></item><item><title>olalav created ticket #204</title><link>https://sourceforge.net/p/simplehtmldom/bugs/204/</link><description>Convenience function for getting first element</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Wed, 07 Dec 2022 09:01:04 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/204/</guid></item><item><title>olalav posted a comment on ticket #201</title><link>https://sourceforge.net/p/simplehtmldom/bugs/201/?limit=25#f500</link><description>diff --git a/simple_html_dom.php b/simple_html_dom.php index bce4d9e..97d6e1d 100644 --- a/simple_html_dom.php +++ b/simple_html_dom.php @@ -117,3 +117,3 @@ function file_get_html( $dom-&gt;clear(); - return false; + $contents = ""; } @@ -144,5 +144,4 @@ function str_get_html( $dom-&gt;clear(); - return false; + $contents = ""; } - return $dom-&gt;load($str, $lowercase, $stripRN); Better version with tabs. PS! The inline editor and preview function on the site seems to hide the first line of content :|</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Wed, 07 Dec 2022 08:54:29 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/201/?limit=25#f500</guid></item><item><title>olalav created ticket #203</title><link>https://sourceforge.net/p/simplehtmldom/bugs/203/</link><description>Always tell user where he expected non-existing element</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Wed, 07 Dec 2022 08:51:07 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/203/</guid></item><item><title>Cees van Wageningen created ticket #202</title><link>https://sourceforge.net/p/simplehtmldom/bugs/202/</link><description>Preg_match error occurs after saving new contentblock</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cees van Wageningen</dc:creator><pubDate>Thu, 24 Nov 2022 10:05:45 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/202/</guid></item><item><title>olalav created ticket #201</title><link>https://sourceforge.net/p/simplehtmldom/bugs/201/</link><description>Never return false on documents</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Tue, 11 Oct 2022 07:22:19 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/201/</guid></item><item><title>Jim Longo posted a comment on ticket #60</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/60/?limit=25#71fb</link><description>I see. One would use $e-&gt;innertext to get the text inside the tag.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim Longo</dc:creator><pubDate>Tue, 30 Aug 2022 21:21:45 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/60/?limit=25#71fb</guid></item><item><title>Jim Longo created ticket #60</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/60/</link><description>No anchor text returned</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim Longo</dc:creator><pubDate>Mon, 29 Aug 2022 23:12:25 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/60/</guid></item><item><title>LogMANOriginal modified ticket #200</title><link>https://sourceforge.net/p/simplehtmldom/bugs/200/</link><description>"Creation of dynamic property" warning in PHP 8.2 (version 1.9.1)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Mon, 09 May 2022 18:01:28 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/200/</guid></item><item><title>LogMANOriginal posted a comment on ticket #200</title><link>https://sourceforge.net/p/simplehtmldom/bugs/200/?limit=50#7f80</link><description>Thanks for your bug report. This is actually a typo. The variable should be called $optional_closing_tags. There is a recent commit in master that illustrates the fix. This should also work in PHP 8.2 and higher. [8dc21bcb714c4edcb4318bdc3f198f4f78762381]</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Mon, 09 May 2022 18:01:14 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/200/?limit=50#7f80</guid></item><item><title>Jeffrey Kastner modified a comment on ticket #159</title><link>https://sourceforge.net/p/simplehtmldom/bugs/159/?limit=25#5233</link><description>disregard</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jeffrey Kastner</dc:creator><pubDate>Thu, 05 May 2022 23:22:57 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/159/?limit=25#5233</guid></item><item><title>Jeffrey Kastner modified a comment on ticket #159</title><link>https://sourceforge.net/p/simplehtmldom/bugs/159/?limit=25#5233</link><description></description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jeffrey Kastner</dc:creator><pubDate>Thu, 05 May 2022 21:47:24 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/159/?limit=25#5233</guid></item><item><title>Jeffrey Kastner modified a comment on ticket #159</title><link>https://sourceforge.net/p/simplehtmldom/bugs/159/?limit=25#5233</link><description>If I am understanding attribute selectors, this is not working again.. * ^ and $ all return 2 Example; echo count( str_get_html('&lt;html&gt;&lt;body&gt;&lt;span class="first second"&gt;Hello!&lt;/span&gt;&lt;span id="third"&gt;ME OH MI!&lt;/span&gt;&lt;/body&gt;&lt;/html&gt;')-&gt;find('span[class^=second]') ); I have been trying to use attribute selectors to try and 'find' a div with an id with random numbers and -slideshow for the value (ex. 8099435804-slideshow) and I haven't been able to get it to work. ~in my case it returns all div's in the...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jeffrey Kastner</dc:creator><pubDate>Thu, 05 May 2022 21:42:44 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/159/?limit=25#5233</guid></item><item><title>Jeffrey Kastner posted a comment on ticket #159</title><link>https://sourceforge.net/p/simplehtmldom/bugs/159/?limit=25#5233</link><description>If I am understanding attribute selectors, this is not working again.. * ^ and $ all return 2 Example; echo count( str_get_html('&lt;html&gt;&lt;body&gt;&lt;span class="first second"&gt;Hello!&lt;/span&gt;&lt;span id="third"&gt;ME OH MI!&lt;/span&gt;&lt;/body&gt;&lt;/html&gt;')-&gt;find('span[class^=second]') ); I have been trying to use attribute selectors to try and 'find' a div with an id with random numbers and -slideshow for the value (ex. 8099435804-slideshow) and I haven't been able to get it to work. ~in my case it returns all div's in the...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jeffrey Kastner</dc:creator><pubDate>Thu, 05 May 2022 21:31:20 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/159/?limit=25#5233</guid></item><item><title>Bjørn Rosell created ticket #200</title><link>https://sourceforge.net/p/simplehtmldom/bugs/200/</link><description>"Creation of dynamic property" warning in PHP 8.2 (version 1.9.1)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bjørn Rosell</dc:creator><pubDate>Mon, 02 May 2022 11:59:30 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/200/</guid></item><item><title>LogMANOriginal modified ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/</link><description>Incorrect handling of &lt;br&gt; tags next to line breaks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Mon, 25 Apr 2022 19:32:41 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/</guid></item><item><title>LogMANOriginal posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#91a4</link><description>Looks good now! However, you must set the Unicode flag, or else preg_replace() may return an invalid Unicode string, which may cause the second preg_replace() to return NULL, and a deprecation error for the third preg_replace(). Good catch. Fixed via [b8d048e46b7f1964c28ea041d39ccb1d05f9a0ed]. And about the manual: I see now that the navigation sidebar is aligned far down upon page load, so that only the documentation for the functions (isset etc.) is immediately visible, not the more useful "Quick...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Mon, 25 Apr 2022 19:32:30 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#91a4</guid></item><item><title>LogMANOriginal committed [b8d048]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/b8d048e46b7f1964c28ea041d39ccb1d05f9a0ed/</link><description>HtmlNode: Replace and collapse unicode whitespace in plaintext</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Mon, 25 Apr 2022 19:25:17 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/b8d048e46b7f1964c28ea041d39ccb1d05f9a0ed/</guid></item><item><title>olalav modified a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#9003</link><description>Looks good now! However, you must set the Unicode flag, or else preg_replace() may return an invalid Unicode string, which may cause the second preg_replace() to return NULL, and a deprecation error for the third preg_replace(). diff --git a/HtmlNode.php b/HtmlNode.php index 9bc6a1a..9649d37 100644 --- a/HtmlNode.php +++ b/HtmlNode.php @@ -351 +351 @@ class HtmlNode - $ret = preg_replace('/\s+/', ' ', $ret); + $ret = preg_replace('/\s+/u', ' ', $ret); And about the manual: I see now that the navigation...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Sun, 24 Apr 2022 19:48:53 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#9003</guid></item><item><title>olalav posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#9003</link><description>Looks good now! However, you must set the Unicode flag here or else preg_replace() returns NULL for certain strings, which causes (deprecation) errors further down. diff --git a/HtmlNode.php b/HtmlNode.php index 9bc6a1a..9649d37 100644 --- a/HtmlNode.php +++ b/HtmlNode.php @@ -351 +351 @@ class HtmlNode - $ret = preg_replace('/\s+/', ' ', $ret); + $ret = preg_replace('/\s+/u', ' ', $ret); And about the manual: I see now that the navigation sidebar is aligned far down upon page load, so that only...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Sun, 24 Apr 2022 19:38:59 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#9003</guid></item><item><title>LogMANOriginal posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#0a37</link><description>PS! Would be nice if you could link to the manual from the "Support" section, because it was hard to find. https://sourceforge.net/projects/simplehtmldom/support Turns out that page is managed by SF. There is no way to change the contents of that page 😔 I added a "Manual" tab instead.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 16:47:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#0a37</guid></item><item><title>LogMANOriginal posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#ada6</link><description>PS! Would be nice if you could link to the manual from the "Support" section, because it was hard to find. https://sourceforge.net/projects/simplehtmldom/support Good idea! I'll do that. The space thing works now, but the BR tag is still not handled well. Try the code in the original post and compare the output when (un)-commenting the commented line. I'm comparing the output of plaintext with what is displayed in the browser and it looks exactly the same. Please note that I have removed wordwrap()...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 16:34:09 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#ada6</guid></item><item><title>olalav posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#1f88</link><description>The space thing works now, but the BR tag is still not handled well. Try the code in the original post and compare the output when (un)-commenting the commented line. PS! Would be nice if you could link to the manual from the "Support" section, because it was hard to find. https://sourceforge.net/projects/simplehtmldom/support</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Sun, 24 Apr 2022 15:32:22 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#1f88</guid></item><item><title>LogMANOriginal posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#41f6</link><description>[67c0f4e21091a9cc66151610a653724a0acb1b69] fixes the whitespace issue. Let me know if this works for you.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 15:03:17 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#41f6</guid></item><item><title>LogMANOriginal committed [67c0f4]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/67c0f4e21091a9cc66151610a653724a0acb1b69/</link><description>HtmlNode: Replace and collapse whitespace in plaintext</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 15:02:17 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/67c0f4e21091a9cc66151610a653724a0acb1b69/</guid></item><item><title>LogMANOriginal posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#2c8b</link><description>Shouldn't plaintext convert newlines to spaces? Did you change this recently? Surely this is a bug/regression, or am I missing something completely? The plaintext implementation is completely rewritten but it passes all tests. Your particular case probably isn't covered by any of the tests right now. I'll check this as well. At the very least &lt;br&gt; seems to work right. PS! Where on the SourceForge page is the link to the manual (the one with the clickable tabs with examples, etc.)? I hope you didn't...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 14:25:54 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#2c8b</guid></item><item><title>olalav posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#1e52</link><description>Shouldn't plaintext convert newlines to spaces? Did you change this recently? Surely this is a bug/regression, or am I missing something completely? $text = "&lt;p&gt;Hello" . "\n" . "World&lt;/p&gt;"; $plain = str_get_html($text)-&gt;plaintext; echo "PLAINTEXT:\n" . $plain . "\n\n"; echo "WORDWRAP:\n" . wordwrap($plain, 80) . "\n"; PS! Where on the SourceForge page is the link to the manual (the one with the clickable tabs with examples, etc.)? I hope you didn't remove this, because I use it as a reference all...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Sun, 24 Apr 2022 13:19:37 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#1e52</guid></item><item><title>LogMANOriginal posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#5e6f</link><description>Please try again with current master. From what I can tell, the output looks right: ***** ** ********,*** ****** ********. ******* **** *** ** ** ******* *** *** ****** ***. *** **** *** ****** ****. *.***. ** **** *** ***** **** ***** ********* *** ************ ** *** *** *** *** ** ****. *** ** ****, ******** ******* *** ******** ********** * ** ******* ****. ******** ** *** *** **** ***********, ** *** *** *** * *** *** ********* .*** ***** ******* *** ** **** ***.*** ****** *** ** **** *** ********...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:56:31 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#5e6f</guid></item><item><title>LogMANOriginal modified ticket #198</title><link>https://sourceforge.net/p/simplehtmldom/bugs/198/</link><description>iconv() detected an illegal character in input string</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:45:22 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/198/</guid></item><item><title>LogMANOriginal posted a comment on ticket #198</title><link>https://sourceforge.net/p/simplehtmldom/bugs/198/?limit=50#f0c3</link><description>This is fixed via [c53a612e6fe61d5b1efc0c3270e20aa34e4e84ee]. Instead of using //IGNORE, it needs to be wrapped inside a try-catch block, so that the character set is detected properly. Eventually, this will be replaced by a better solution, but this works for now. Thanks again for reporting!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:45:22 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/198/?limit=50#f0c3</guid></item><item><title>LogMANOriginal committed [c53a61]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/c53a612e6fe61d5b1efc0c3270e20aa34e4e84ee/</link><description>HtmlDocument: Use try-catch block for iconv</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/c53a612e6fe61d5b1efc0c3270e20aa34e4e84ee/</guid></item><item><title>LogMANOriginal committed [d553de]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/d553ded9f74b9530a3424169a6b8e4761eaccc5f/</link><description>HtmlNode: Fix empty if-statement</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/d553ded9f74b9530a3424169a6b8e4761eaccc5f/</guid></item><item><title>LogMANOriginal committed [7a5b98]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/7a5b98cde8cf9f0468881ffe11e4fc9e90d8e1b1/</link><description>docs: Include recent changes</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/7a5b98cde8cf9f0468881ffe11e4fc9e90d8e1b1/</guid></item><item><title>LogMANOriginal committed [025297]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/025297b6c30fe4c5bf775246ce80c8eadcc93922/</link><description>HtmlDocument: Let the parser decode entities</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/025297b6c30fe4c5bf775246ce80c8eadcc93922/</guid></item><item><title>LogMANOriginal committed [cc1063]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/cc1063f1cd6c1e314a911247ee37db7c71e8c0e9/</link><description>HtmlDocument: Inline token_equal, _slash, and _attr</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/cc1063f1cd6c1e314a911247ee37db7c71e8c0e9/</guid></item><item><title>LogMANOriginal committed [ad6686]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/ad6686020381a1cbc3356392c26e4162a6e9eebe/</link><description>HtmlDocument: Don't use magic functions</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/ad6686020381a1cbc3356392c26e4162a6e9eebe/</guid></item><item><title>LogMANOriginal committed [133547]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/1335470abafe032c22cfd07961a4181e006292cb/</link><description>HtmlNode: Stop removing UTF-8 BOM from the end of a string</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/1335470abafe032c22cfd07961a4181e006292cb/</guid></item><item><title>LogMANOriginal committed [8dc21b]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/8dc21bcb714c4edcb4318bdc3f198f4f78762381/</link><description>HtmlDocument: Fix broken $forceTagsClosed = false</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/8dc21bcb714c4edcb4318bdc3f198f4f78762381/</guid></item><item><title>LogMANOriginal committed [f658bc]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/f658bc60f7483bb4df0a5161e4104f5cfa0c6369/</link><description>HtmlDocument: Use shortcuts for seek methods</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/f658bc60f7483bb4df0a5161e4104f5cfa0c6369/</guid></item><item><title>LogMANOriginal committed [34743a]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/34743a79e5466280bf78fbea489b787e483f91aa/</link><description>HtmlDocument: Inline skip method</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/34743a79e5466280bf78fbea489b787e483f91aa/</guid></item><item><title>LogMANOriginal committed [718b90]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/718b90a6827a38c2a6ac2897e77c99951be222e9/</link><description>HtmlDocument: Add shortcuts for the parser</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/718b90a6827a38c2a6ac2897e77c99951be222e9/</guid></item><item><title>LogMANOriginal committed [2b4971]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/2b4971f4d0a115f426a58350c82dc178545190cd/</link><description>HtmlDocument: Use native functions for tag names and attribute values</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/2b4971f4d0a115f426a58350c82dc178545190cd/</guid></item><item><title>LogMANOriginal committed [101a85]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/101a853ddd3bb6166a0b05ad5125fc085c922cfb/</link><description>Fix memory parsing test</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/101a853ddd3bb6166a0b05ad5125fc085c922cfb/</guid></item><item><title>LogMANOriginal committed [d573cd]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/d573cd4d0b3ec77560d2b512c668cebb85a5c437/</link><description>HtmlDocument: Don't remove noise before parsing.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/d573cd4d0b3ec77560d2b512c668cebb85a5c437/</guid></item><item><title>LogMANOriginal committed [88c67b]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/88c67b58f3e6796b7f0dd6b9aa07b19fd472ba70/</link><description>HtmlDocument: Don't assign nodes by reference</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sun, 24 Apr 2022 08:43:13 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/88c67b58f3e6796b7f0dd6b9aa07b19fd472ba70/</guid></item><item><title>Roland Heymanns posted a comment on ticket #198</title><link>https://sourceforge.net/p/simplehtmldom/bugs/198/?limit=50#a091</link><description>Thanks for your good work! The error message first appeared after I upgraded PHP from 8.0 to 8.1 last week.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Roland Heymanns</dc:creator><pubDate>Tue, 19 Apr 2022 23:31:08 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/198/?limit=50#a091</guid></item><item><title>LogMANOriginal modified ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/</link><description>Incorrect handling of &lt;br&gt; tags next to line breaks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Tue, 19 Apr 2022 17:54:37 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/</guid></item><item><title>LogMANOriginal posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#eb2e</link><description>Thanks for reporting. I fixed your original message. You are right, the current implementation of &lt;br&gt; is wrong. I haven't tested this yet but it should give slightly better results if you define DEFAULT_BR_TEXT like this: define("DEFAULT_BR_TEXT", PHP_EOL) At the very least, this makes it platform independent. That said, there is additional work to do in the parser to handle all cases (like the &lt;br&gt; a case).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Tue, 19 Apr 2022 17:54:37 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=50#eb2e</guid></item><item><title>LogMANOriginal modified ticket #198</title><link>https://sourceforge.net/p/simplehtmldom/bugs/198/</link><description>iconv() detected an illegal character in input string</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Tue, 19 Apr 2022 17:39:41 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/198/</guid></item><item><title>LogMANOriginal posted a comment on ticket #198</title><link>https://sourceforge.net/p/simplehtmldom/bugs/198/?limit=50#7f20</link><description>Thanks for reporting. It took me a while to figure out what is going on. Am I right to assume that you are running on PHP 8.x? In previous versions that error would not have been reported because of the error suppression operator (@). (Un-)fortunately the behavior of this operator changed in PHP 8: https://php.watch/versions/8.0/fatal-error-suppression The behavior for //IGNORE depends on the specific implementation of iconv, some of which completely ignore this flag. Still, this is a good hack to...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Tue, 19 Apr 2022 17:39:41 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/198/?limit=50#7f20</guid></item><item><title>olalav posted a comment on ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#a71e</link><description>The text should say "The BR tag is not...". Evidently this editor interprets HTML tags as-is, and initial postings can't be edited :/</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Tue, 19 Apr 2022 13:17:36 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/?limit=25#a71e</guid></item><item><title>olalav created ticket #199</title><link>https://sourceforge.net/p/simplehtmldom/bugs/199/</link><description>Incorrect handling of &lt;br&gt; tags next to line breaks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">olalav</dc:creator><pubDate>Tue, 19 Apr 2022 13:15:34 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/199/</guid></item><item><title>Roland Heymanns created ticket #198</title><link>https://sourceforge.net/p/simplehtmldom/bugs/198/</link><description>iconv() detected an illegal character in input string</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Roland Heymanns</dc:creator><pubDate>Tue, 12 Apr 2022 00:00:00 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/198/</guid></item><item><title>LogMANOriginal modified ticket #50</title><link>https://sourceforge.net/p/simplehtmldom/feature-requests/50/</link><description>PHP 7 .x compatibility</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 22:00:52 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/feature-requests/50/</guid></item><item><title>LogMANOriginal modified ticket #60</title><link>https://sourceforge.net/p/simplehtmldom/feature-requests/60/</link><description>parsing stops after first multibyte character</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:59:37 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/feature-requests/60/</guid></item><item><title>LogMANOriginal modified ticket #64</title><link>https://sourceforge.net/p/simplehtmldom/feature-requests/64/</link><description>Comments on MAX_FILE_SIZE</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:59:08 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/feature-requests/64/</guid></item><item><title>LogMANOriginal modified ticket #65</title><link>https://sourceforge.net/p/simplehtmldom/feature-requests/65/</link><description>Notify when zero elements were found</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:58:22 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/feature-requests/65/</guid></item><item><title>LogMANOriginal modified ticket #66</title><link>https://sourceforge.net/p/simplehtmldom/feature-requests/66/</link><description>Role attribute</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:56:09 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/feature-requests/66/</guid></item><item><title>LogMANOriginal modified ticket #59</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/59/</link><description>Slashdot example updated</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:55:40 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/59/</guid></item><item><title>LogMANOriginal posted a comment on ticket #59</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/59/?limit=50#b796</link><description>Thanks for the feedback! The example in 1.9 is probably not functional anymore, but there is an updated version in the current master that still works. Here is the link for future reference: https://sourceforge.net/p/simplehtmldom/repository/ci/master/tree/example/scraping/example_scraping_slashdot.php</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:55:40 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/59/?limit=50#b796</guid></item><item><title>LogMANOriginal posted a comment on ticket #58</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/58/?limit=50#1edf</link><description>That choice is entirely up to you.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:49:04 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/58/?limit=50#1edf</guid></item><item><title>LogMANOriginal modified ticket #58</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/58/</link><description>Is this project active anymore?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:49:04 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/58/</guid></item><item><title>LogMANOriginal modified ticket #56</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/56/</link><description>How to avoid break on 404 errors?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:35:24 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/56/</guid></item><item><title>LogMANOriginal posted a comment on ticket #56</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/56/?limit=50#d9cd</link><description>Good to know you found a solution :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:35:24 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/56/?limit=50#d9cd</guid></item><item><title>LogMANOriginal modified ticket #54</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/54/</link><description>Traversing the Dom within a series of columns</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:33:50 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/54/</guid></item><item><title>LogMANOriginal posted a comment on ticket #54</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/54/?limit=50#4c79</link><description>You probably figured it out in the mean time, but here is a complete example that will give you what you want. &lt;?php include_once 'simple_html_dom.php'; $doc = &lt;&lt;&lt;EOD &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td id="column2" class="style3"&gt;A&lt;/td&gt; &lt;td id="column2" class="style2"&gt;B&lt;/td&gt; &lt;td&gt; &lt;a href="#link")&gt;Description of Link&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; EOD; $html = str_get_html($doc); $href = $html-&gt;find('a', 0)-&gt;href; $description = $html-&gt;find('a', 0)-&gt;innertext; echo $href . PHP_EOL . $description . PHP_EOL; // #link // Description...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:33:50 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/54/?limit=50#4c79</guid></item><item><title>LogMANOriginal posted a comment on ticket #53</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/53/?limit=50#c949</link><description>This is probably no longer relevant but the for loop in your example indexes over the value of the first element instead of all script elements. foreach($items-&gt;find('script',0) as $e) { $e-&gt;outertext = ''; echo '$e: ' . $e . '&lt;br/&gt;'; } Notice the ,0 in -&gt;find('script',0). This is why the error occurs. Here is the correct version: foreach($items-&gt;find('script') as $e) { $e-&gt;outertext = ''; echo '$e: ' . $e . '&lt;br/&gt;'; }</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:28:54 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/53/?limit=50#c949</guid></item><item><title>LogMANOriginal modified ticket #53</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/53/</link><description>Removing tags does not work</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:28:54 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/53/</guid></item><item><title>LogMANOriginal modified ticket #52</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/52/</link><description>Timezone change</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:18:25 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/52/</guid></item><item><title>LogMANOriginal modified ticket #45</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/45/</link><description>Uncaught Error: Call to a member function find() on string in ... Stack trace: #0 {main} thrown in</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:17:57 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/45/</guid></item><item><title>LogMANOriginal modified ticket #35</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/35/</link><description>HTTP Request failed</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:17:30 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/35/</guid></item><item><title>LogMANOriginal modified ticket #43</title><link>https://sourceforge.net/p/simplehtmldom/support-requests/43/</link><description>raspado a un script de json</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 21:16:48 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/support-requests/43/</guid></item><item><title>LogMANOriginal modified ticket #163</title><link>https://sourceforge.net/p/simplehtmldom/bugs/163/</link><description>Missing whitespace in plaintext property</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 20:57:45 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/163/</guid></item><item><title>LogMANOriginal posted a comment on ticket #163</title><link>https://sourceforge.net/p/simplehtmldom/bugs/163/?limit=50#643e</link><description>966c5e39493eff7dc1eb77e0004bdc0015037b34 fixes various issues related to spaces and line breaks when generating plain text. For all the examples provided here, it produces the correct output. It also properly collapses superfluous spaces and line breaks, so that the output should be much more readable, especially for awkwardly formatted HTML documents.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 20:57:45 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/163/?limit=50#643e</guid></item><item><title>LogMANOriginal committed [966c5e]</title><link>https://sourceforge.net/p/simplehtmldom/repository/ci/966c5e39493eff7dc1eb77e0004bdc0015037b34/</link><description>HtmlNode: Improve plain text output of text()</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 20:50:47 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/repository/ci/966c5e39493eff7dc1eb77e0004bdc0015037b34/</guid></item><item><title>Stephen MacMinn posted a comment on ticket #197</title><link>https://sourceforge.net/p/simplehtmldom/bugs/197/?limit=25#2d75/5b75</link><description>Thanks for the response! On Sat, Apr 9, 2022 at 6:51 AM LogMANOriginal logmanoriginal@users.sourceforge.net wrote: status: open --&gt; wont-fix assigned_to: LogMANOriginal Comment: I can see how this is annoying. Unfortunately, UTF-8//IGNORE silently discards characters that cannot be represented in the target charset, which may result in incorrect output. As you already know, UTF-8//TRANSLIT also doesn't always work and heavily depends on the actual implementation of iconv and system settings (some...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen MacMinn</dc:creator><pubDate>Sat, 09 Apr 2022 15:37:01 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/197/?limit=25#2d75/5b75</guid></item><item><title>LogMANOriginal modified a comment on ticket #148</title><link>https://sourceforge.net/p/simplehtmldom/bugs/148/?limit=50#6bc6</link><description>I completely misunderstood the original report and finally figured it out. Thanks for all your feedback! This issue is resolved via [d6dcf50d6b03eb1d0c575abb7011abb658fefcf1] [4ad20901f0e63356cb3eb15a1cf4d9bf3a9837cc] by comparing the string length with PHP_MAXPATHLEN before calling is_file(). Edit: Had to fix the fix because the original fix was broken :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogMANOriginal</dc:creator><pubDate>Sat, 09 Apr 2022 13:57:27 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net/p/simplehtmldom/bugs/148/?limit=50#6bc6</guid></item></channel></rss>