title: PHP str_replace seems to be applying htmlspecialchars
body: <p>I have a strange issue I can't seem to solve.  I am running a string replace as follows:</p>
  
  <pre><code>$message = str_replace("{{CODE}}", $myCode, $content["codeMessage"]);
  </code></pre>
  
  <p>The replace works fine but if <code>$content["codeMessage"]</code>contains an apostrophe, the value of <code>$message</code> is:</p>
  
  <p><code>Here&amp;#039;s your login code</code></p>
  
  <p>It's as if htmlspecialchars is being applied automatically but I'm sending this to an application that isn't HTML aware so I need to maintain the apostrophe.  I've tried all kinds of variations and even tried running an htmlspecialchars_decode on the variable but that doesn't seem to do the trick.</p>
  
  <p>Thank you!</p>