<p dir="auto">I am using Symfony's DomCrawler to fetch an information from website.<br>
In one of the pages there is a text including non-html-encoded text like following :</p>
<p dir="auto"><code class="notranslate">&lt;a href="some-url.html"&gt;Lorem ipsum &lt;&lt;dolor sit&gt;&gt; amet &lt;/a&gt;</code><br>
And when I try to crawl the text from the <code class="notranslate">&lt;a&gt;</code> tag using the <code class="notranslate">filterXPath()-&gt;text()</code> method I get <code class="notranslate">Lorem ipsum &lt;</code>, because it behaves to symbols like broken html tags and simply ignores them.</p>
<p dir="auto">Also, when i try to use $node-&gt;filterXPath('my-xpath/a')-&gt;html(), I also get broken html like following example :</p>
<p dir="auto"><a href="some-url.html">Lorem ipsum &gt;</a><br>
So, my question is if there is any way to get the "plain" text out of the node ?</p>
<p dir="auto">I am using Symfony's DomCrawler to fetch an information from website.<br>
In one of the pages there is a text including non-html-encoded attributes like following :</p>
<p dir="auto"><code class="notranslate">&lt;a href="some-url.html"&gt;Lorem ipsum &lt;&lt;dolor sit&gt;&gt; amet &lt;/a&gt;</code><br>
And when I try to crawl the text from the a tag using the filterXPath method I get Lorem ipsum &lt;, because as I suppose it behaves to symbols like broken html tags and simply ignores them.</p>
<p dir="auto">Also, when i try to use <code class="notranslate">$node-&gt;filterXPath('my-xpath/a')-&gt;html()</code>, I also get broken html like following example :</p>
<p dir="auto"><code class="notranslate">&lt;a href="some-url.html"&gt;Lorem ipsum &amp;gt;&lt;/a&gt;</code><br>
So, my question is if there is any way to get the "plain" text out of the node ?</p>