Replacing certain text on a page with jQuery
<p>I have an issue with a CMS I'm  using where I can't insert a product CMS page with symbols like Registered Trademark (R) and copying right (C) etc. (very annoying) so I need a work around.</p>

<p>Im trying to work out the code for replacing a text string (r) with the actual symbol '&reg;'.</p>

<p>Ive come close, the page loads, and the text string is changed to the symbol  but it seems to get caught in an infinite loop. How do i get this to stop?</p>

<p>Also, there is a delay from when the page loads to when the string changes to the symbol - am I able to stop this or at lease shorten it? Note: The delay only occurs when I run it in the CMS. There doesn't seem to be one when I do test page with just the below code in it.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var replaced = $("body").html().replace('(r)','&amp;reg;');
$("body").html(replaced);</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;h3&gt;Hello, this is a test replacing(r).&lt;/h3&gt;
&lt;h4&gt;Hello, this is a test replacing(r).&lt;/h4&gt;
&lt;p&gt;Hello, this is a test replacing(r).&lt;/p&gt;</code></pre>
</div>
</div>
</p>