title: Convert accents to HTML, but ignore tags
body: <p>The code below converts text for characters with accents. But it also converts the HTML tags which I would like to leave intact. How can I only convert accented characters and leave all other special characters intact? Thanks.</p>
  
  <pre><code>$temp = file_get_contents("file.html");
  echo htmlentities($temp,ENT_NOQUOTES,'UTF-8');
  </code></pre>