<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>&lt;blockquote&gt;
Doesn't work no matter what you try. I tried adding slashes, using addslahes(t) and all. 
&lt;/blockquote&gt;

I've google it a little bit and seems to be a problem of xpath 1.0, which doesn't define any escape method. Most of the people suggested to use the &lt;a href=&quot;https://developer.mozilla.org/en/XPath/Functions/concat&quot;&gt;concat&lt;/a&gt; function. I didn't test it but you should be able to do something like this one:
&lt;pre&gt;&lt;code&gt;
contains(.,concat(&quot;can't escape&quot;,'&quot;',&quot;this&quot;,'&quot;'))
of if you prefer
contains(.,concat('can',&quot;'&quot;,'t escape &quot;this&quot;'))
&lt;/code&gt;&lt;/pre&gt;</body>
  <body-html>&lt;p&gt;&lt;blockquote&gt;
&lt;br /&gt;Doesn't work no matter what you try. I tried adding slashes, using addslahes(t) and all. 
&lt;br /&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;I've google it a little bit and seems to be a problem of xpath 1.0, which doesn't define any escape method. Most of the people suggested to use the &lt;a href=&quot;https://developer.mozilla.org/en/XPath/Functions/concat&quot;&gt;concat&lt;/a&gt; function. I didn't test it but you should be able to do something like this one:
&lt;br /&gt;&lt;pre&gt;&lt;code&gt;
contains(.,concat(&quot;can't escape&quot;,'&quot;',&quot;this&quot;,'&quot;'))
of if you prefer
contains(.,concat('can',&quot;'&quot;,'t escape &quot;this&quot;'))
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</body-html>
  <created-at type="datetime">2008-12-23T00:24:38Z</created-at>
  <forumable-id type="integer">2</forumable-id>
  <forumable-type>Forum</forumable-type>
  <id type="integer">85630</id>
  <topic-id type="integer">18247</topic-id>
  <updated-at type="datetime">2008-12-23T00:24:38Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">28612</user-id>
</post>
