title: DOM xpath breaks quotation marks
body: <p>I'm trying to parse some UTF-8 encoded html text that contains the left and right quotation marks ’
  But when I try to get the value of the html back from DOM with saveHTML(), the quotation marks always get messed up.</p>
  
  <p>Now I've tried several including utf8_encoding the text before putting it into DOM, I've tried putting ('1.0', 'UTF-8') into the constructor and it also didn't work.</p>
  
  <p>I'm running out of ideas how to sort this out. 
  Converting the quotation marks into html entities isn't the option for me.</p>
  
  <p>Here is a simplified example that breaks the quotation marks:</p>
  
  <pre><code>$a = "&lt;html&gt;&lt;body&gt;&lt;div&gt;won’t you, will you, won’t you, join the &lt;/div&gt;&lt;/body&gt;&lt;/html&gt;";
  $dom = new DOMDocument();
  
  $dom-&gt;loadHTML($a);
  
  $xpath = new DOMXPath($dom);
  
  $tag = $xpath-&gt;query('//div');
  
  foreach($tag as $t)
      echo $dom-&gt;saveHTML($t);
  </code></pre>
  
  <p>the returned text looks like: will you,  wonât you, will you, wonât you, join the</p>