title: Javascript: replace() function not working in Mac safari
body: <p>I have the below set of code to replace specific tags from string.It's not working in Mac safari but working properly in windows chrome and firefox.</p>
  
  <p>Error: TypeError: 'undefined' is not an object (evaluating 'n.innerHTML.replace')</p>
  
  <pre><code>html_data = html_data.replace(/para/g, "p");
  html_data = html_data.replace(/useful/g, "span");
  html_data = html_data.replace(/extra_info/g, "span");
  </code></pre>