title: How can I prevent html entities with PHP a DOMDocument::saveHTML()?
body: <p>Due to custom storage needs (the "why" is not important here, thanks!) I have to save html <code>&lt;a&gt;</code> links in a specific format such as this:</p>
  
  <pre><code>myDOMNode-&gt;setAttribute("href", "{{{123456}}}");
  </code></pre>
  
  <p>Everything works fine until i call <code>saveHTML()</code> on the containing DOMDocument. This kills it, since it encodes <code>{</code> in <code>%7B</code>.</p>
  
  <p>This is a legacy application where href="{{{123456}}}" works as a placeholder. The command-line parser look for this pattern exactly (unencoded) and cannot be changed.</p>
  
  <p>I've no choice but to do it this way.</p>
  
  <p>I cannot htmldecode() the result.</p>
  
  <p>This HTML will never be displayed as this, it is just a storage need.</p>
  
  <p>Thanks for your help!</p>
  
  <p>Note: I've looked around for 2 hours but none of the proposed solution worked for me. For those who will blindly mark the question as duplicate: please comment and let me know.</p>