title: PHP DOMDocument/LIBXML replaces ( " and ' )
body: <p>I'm trying to manipulate some sourcecode inside my WordPress plugin and have the issue that DOMDocument manipulates some strings and chars where it's not nessessary. Primary I only want to add some sourcecode on a specific id.</p>
  
  <p>Thats the sourcecode: </p>
  
  <pre><code>$doc = new \DOMDocument();
  $doc-&gt;xmlStandalone = false;
  $doc-&gt;encoding = 'UTF-8';
  libxml_use_internal_errors( true );
  $doc-&gt;loadHTML( $html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
  // Add some HTML Divs and CSS classes
  $html = $doc-&gt;saveHTML();
  </code></pre>
  
  <p>Original Sourcecode (WordPress): </p>
  
  <pre><code>&lt;title&gt;WordPress &amp;#8211; Development &amp;#8211; &lt;/title&gt;
  &lt;link rel='dns-prefetch' href='//fonts.googleapis.com' /&gt;
  &lt;link rel='dns-prefetch' href='//s.w.org' /&gt;
  &lt;link href='https://fonts.gstatic.com' crossorigin rel='preconnect' /&gt;
  &lt;link rel='stylesheet' id='dashicons-css'  href='http://localhost/WordPress/wp-includes/css/dashicons.min.css?ver=4.9.6' type='text/css' media='all' /&gt;
  </code></pre>
  
  <p>After the DOMDocument routine:</p>
  
  <pre><code>&lt;title&gt;WordPress &amp;ndash; Development &amp;ndash; &lt;/title&gt;
  &lt;link rel="dns-prefetch" href="//fonts.googleapis.com"&gt;
  &lt;link rel="dns-prefetch" href="//s.w.org"&gt;
  &lt;link href="https://fonts.gstatic.com" crossorigin rel="preconnect"&gt;
  &lt;link rel="stylesheet" id="dashicons-css" href="http://localhost/WordPress/wp-includes/css/dashicons.min.css?ver=4.9.6" type="text/css" media="all"&gt;
  </code></pre>
  
  <p>Primary my problem are that he replaces some ' with ", removes "/"...</p>
  
  <p>Hope anyone can help me. :-) </p>