<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>&lt;pre&gt;// Search body's inner html
function searchDoc(t) {
	return document.evaluate(&amp;quot;//child::text()[contains(.,'&amp;quot;+t+&amp;quot;')]&amp;quot;,document,null,9,null).singleNodeValue!=null;
}

alert(searchDoc(&amp;quot;wouldn't&amp;quot;));&lt;/pre&gt;

Doesn't work no matter what you try. I tried adding slashes, using addslahes(t) and all.
&lt;div cite=&quot;signature&quot;&gt;
&lt;hr&gt;
&lt;em&gt;&amp;quot;None are more hopelessly enslaved than those who falsely believe they are free.&amp;quot;&lt;/em&gt; - &lt;b&gt;Johann Wolfgang von Goethe&lt;/b&gt;
&lt;/div&gt;</body>
  <body-html>&lt;p&gt;&lt;pre&gt;// Search body's inner html
function searchDoc(t) {
	return document.evaluate(&amp;quot;//child::text()[contains(.,'&amp;quot;+t+&amp;quot;')]&amp;quot;,document,null,9,null).singleNodeValue!=null;
}

alert(searchDoc(&amp;quot;wouldn't&amp;quot;));&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Doesn't work no matter what you try. I tried adding slashes, using addslahes(t) and all.
&lt;br /&gt;&lt;div cite=&quot;signature&quot;&gt;&lt;hr /&gt;&lt;em&gt;&amp;quot;None are more hopelessly enslaved than those who falsely believe they are free.&amp;quot;&lt;/em&gt; - &lt;b&gt;Johann Wolfgang von Goethe&lt;/b&gt;&lt;/div&gt;&lt;/p&gt;</body-html>
  <created-at type="datetime">2008-12-22T20:20:18Z</created-at>
  <forumable-id type="integer">2</forumable-id>
  <forumable-type>Forum</forumable-type>
  <id type="integer">85558</id>
  <topic-id type="integer">18247</topic-id>
  <updated-at type="datetime">2008-12-22T20:20:18Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">23652</user-id>
</post>
